Post Reply 
STRINGFROMID and gradians
09-21-2018, 09:44 AM
Post: #21
RE: STRINGFROMID and gradians
Hello,

"I wouldn't mind an HPPL GOTO statement! Even C has GOTO and it would make translating programs to HPPL easier in some cases."

Unfortunately, this will not happen, at least not anytime soon.

Not because I do not like gotos or anything like that (I have done enough Basic or ASM to know their worth), but because GOTO are actually VERY dificult to implement in a language which has scopes, local variables and the like...

However, since you are talking about goto C, if you look at "non messy code" (ie, code that is reasonably clean) and look at the GOTO usage, you will see that >80% of them are there to cover a single situation. The exit of the inside of a double (or deeper) loop.
Something along the lines of:
for all elements in a list
for all elements in a sub-list
if something, then do it and stop searching (goto end)
end:;

in C, you either have to create boolean and set them in the inner loop and test it in the outer loop, or do a GOTO...
However, in HPPL, you have the EXIT(n) construct which does exactly that for you (CONTINUE(n) is also available)
So, most uses of GOTO are already covered in a much cleaner way...

This does not mean that a GOTO would not be nice, but the lesser need of the functionality makes the implementation investment not really worth it...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: STRINGFROMID and gradians - roadrunner - 09-18-2018, 03:46 PM
RE: STRINGFROMID and gradians - roadrunner - 09-18-2018, 04:22 PM
RE: STRINGFROMID and gradians - CyberAngel - 09-18-2018, 04:39 PM
RE: STRINGFROMID and gradians - roadrunner - 09-18-2018, 05:09 PM
RE: STRINGFROMID and gradians - Tyann - 09-19-2018, 05:02 AM
RE: STRINGFROMID and gradians - CyberAngel - 09-19-2018, 03:53 PM
RE: STRINGFROMID and gradians - CyberAngel - 09-19-2018, 04:10 PM
RE: STRINGFROMID and gradians - toml_12953 - 09-20-2018, 05:52 PM
RE: STRINGFROMID and gradians - CyberAngel - 09-20-2018, 05:58 PM
RE: STRINGFROMID and gradians - cyrille de brébisson - 09-21-2018 09:44 AM
RE: STRINGFROMID and gradians - CyberAngel - 09-21-2018, 04:49 PM
RE: STRINGFROMID and gradians - Tyann - 09-22-2018, 02:37 PM
RE: STRINGFROMID and gradians - CyberAngel - 09-21-2018, 09:04 PM



User(s) browsing this thread: 1 Guest(s)