HP Forums
Wrong description of RPL ENTER? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Wrong description of RPL ENTER? (/thread-14647.html)



Wrong description of RPL ENTER? - Orome - 03-14-2020 07:24 PM

This description is incorrect, isn't it?

Quote:If you press the digit 5 on an RPL calculator the “5” is entered into level 1 of the stack. ... If you then press ENTER RPL will terminate the digit 5, and leave it on level 1 of the stack.

In fact, on RPL calculators, when you press 5, you are working on the command line, and pressing ENTER puts it on level 1 of the stack. In fact most keys behave the same: they (first) put it on the stack. Correct?


RE: Wrong description of RPL ENTER? - rprosperi - 03-14-2020 09:20 PM

(03-14-2020 07:24 PM)Orome Wrote:  This description is incorrect, isn't it?

Quote:If you press the digit 5 on an RPL calculator the “5” is entered into level 1 of the stack. ... If you then press ENTER RPL will terminate the digit 5, and leave it on level 1 of the stack.

In fact, on RPL calculators, when you press 5, you are working on the command line, and pressing ENTER puts it on level 1 of the stack. In fact most keys behave the same: they (first) put it on the stack. Correct?

These are mostly semantics. While the command line is active it technically isn't "on" the stack until you either press ENTER to save the edited version, or press ON to abort the editor and restore the prior 'top' (or bottom, depending on the view you choose to use) stack element.

So when entering a new object, it is not "on" the stack until you press ENTER.

I think this answers, but not sure, as there are subtle aspects of this topic and it's not 100% clear what you are trying to distinguish from what. If this doesn't answer, please clarify, perhaps with an example.


RE: Wrong description of RPL ENTER? - Orome - 03-14-2020 09:25 PM

rprosperi Wrote:  I think this answers,...

I think so: the text from the linked article is incorrect, for the reasons suggested.


RE: Wrong description of RPL ENTER? - Dave Britten - 03-14-2020 10:17 PM

You are correct, the ENTER key is "parse the command line" and nothing actually goes on the stack until the command line has been parsed. You put multiple objects onto the command line separated by spaces, and they'll all be processed in sequence. For example: 5 8 2 ENTER will put 5, 8, and 2 on the stack. When the command line isn't active (i.e. you haven't started typing anything), then ENTER is just a convenient shortcut for DUP, which makes it act a bit like the older RPN stack.


RE: Wrong description of RPL ENTER? - cdmackay - 03-14-2020 11:44 PM

It is perhaps slightly confusing then, that ENTER isn't necessary; e.g. 2 SPC 3 +

Unless we then add that every other operation includes an implicit ENTER?


RE: Wrong description of RPL ENTER? - Dave Britten - 03-15-2020 12:09 AM

(03-14-2020 11:44 PM)cdmackay Wrote:  It is perhaps slightly confusing then, that ENTER isn't necessary; e.g. 2 SPC 3 +

Unless we then add that every other operation includes an implicit ENTER?

Unless your entry mode is ALG or PRG. The fun never ends! Wink


RE: Wrong description of RPL ENTER? - rprosperi - 03-15-2020 12:18 AM

In Wickes' 41/48 Transitions, the basic definition of the HP 48 operation ENTER is:

"Take the text in the command line, check it for correct object syntax, then treat it as a program and execute the objects defined there."

At first, this is a bit jarring and non-intuitive, especially when just transitioning from RPN -> RPL, but of course after reflection and a better understanding of RPL objects and programs, it makes perfect sense.

Truly clever, those guys were...


RE: Wrong description of RPL ENTER? - Orome - 03-15-2020 12:22 PM

rprosperi Wrote:  In Wickes' 41/48 Transitions, ...

Yes, that's part of what made it clear to me that the quoted article was wrong.


RE: Wrong description of RPL ENTER? - rprosperi - 03-15-2020 03:03 PM

(03-15-2020 12:22 PM)Orome Wrote:  
rprosperi Wrote:  In Wickes' 41/48 Transitions, ...

Yes, that's part of what made it clear to me that the quoted article was wrong.

Technically, you are quite right, the quoted phrase from the article is wrong (or at least incomplete). But in the context of Richard's article, intended to highlight the evolution of RPN -> RPL, it's conceptually right in that it serves to illustrate the different behavior of ENTER in the 2 entry systems.

In both cases, an 'entry' is incomplete until terminated by either ENTER, or a function, etc. Jumping straight to the definition used above, while still trying to explain the subtle differences between the entry systems would likely confuse the reader - indeed if it did not, then the reader likely did not need to read the article, hence the liberty taken to bend the truth to make a point.