HP Forums

Full Version: Suggestions for enhancements to PPL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Yes! All the END statements can get confusing even with indentation.
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!
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.
(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.
(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!
(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.
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
Reference URL's