HP Forums
Suggestions for enhancements to PPL - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Suggestions for enhancements to PPL (/thread-3383.html)



Suggestions for enhancements to PPL - BruceH - 03-15-2015 01:17 PM

Can we please have WEND, ENDIF (or FI) and NEXT added as synonyms for END?

I often find myself with multiple END statements together, especially while writing code using the template feature to insert blocks. Finding the right point to add the next piece of code is harder than it need be because you have to scroll up and down to check which END belongs to which starting statement.

If all the ENDs aren't called END then the problem is reduced. :-)

If the editor could display the nesting depth as a status option somewhere then that would also be useful.


RE: Suggestions for enhancements to PPL - toml_12953 - 03-15-2015 03:10 PM

Yes! All the END statements can get confusing even with indentation.


RE: Suggestions for enhancements to PPL - DrD - 03-15-2015 03:55 PM

At least all the END's can be ended with an ending comment:

WHILE <expr> DO
END; // Ends WHILE <expr>

I have resorted to the above habit, especially given the small text font used in the conn kit, which makes finding the little BUGgers difficult!


RE: Suggestions for enhancements to PPL - Jurgen Keller - 03-15-2015 04:45 PM

If you need such an extension, probably your code smells ;-)

I understand that for calculator programs you probably don't want to follow the same engineering principles as for professional software. Actually I was just looking for some sort of justification to say that I don't like this EndIf, EndFor, EndWhile stuff. Maybe it's because as a Swiss guy I grew up with Pascal and Modula-2 and I'm used to this simple END keyword.

The design of programming languages is a wide field for discussions, and often it's hard to argue for one or the other decision as some things are a matter of taste.


RE: Suggestions for enhancements to PPL - Gerald H - 03-15-2015 07:03 PM

(03-15-2015 01:17 PM)BruceH Wrote:  Can we please have WEND, ENDIF (or FI) and NEXT added as synonyms for END?

I often find myself with multiple END statements together, especially while writing code using the template feature to insert blocks. Finding the right point to add the next piece of code is harder than it need be because you have to scroll up and down to check which END belongs to which starting statement.

If all the ENDs aren't called END then the problem is reduced. :-)

If the editor could display the nesting depth as a status option somewhere then that would also be useful.

No, nesting depth is a waste of effort, individual words as in 1st para are clearly the way to go.


RE: Suggestions for enhancements to PPL - bobkrohn - 03-15-2015 07:19 PM

(03-15-2015 04:45 PM)Jurgen Keller Wrote:  If you need such an extension, probably your code smells ;-)

Excellent! Another new computer term I'm learning.
This applies perfectly. Thank You!


RE: Suggestions for enhancements to PPL - bobkrohn - 03-15-2015 07:23 PM

(03-15-2015 03:55 PM)DrD Wrote:  At least all the END's can be ended with an ending comment:

WHILE <expr> DO
END; // Ends WHILE <expr>

I have resorted to the above habit, especially given the small text font used in the conn kit, which makes finding the little BUGgers difficult!

I do that too.
Also exaggerate the indentation so it's a visual clue.
The 3rd party program PrimeComm does automatic formatting of source code.


RE: Suggestions for enhancements to PPL - cyrille de brébisson - 03-16-2015 06:16 AM

Hello

Do you know the difference between HPPrime and the DiskWorld?

Quote:I often find myself with multiple END statements together

"It's END's all the way down"

Cyrille