HP Forums
RPN save stack to list - 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: RPN save stack to list (/thread-5085.html)



RPN save stack to list - retoa - 11-06-2015 09:48 AM

Hello

In RPN mode you can save the stack to a list, which I find very useful.
Is there a way to restore the list to the stack?
How do you address a list element in RPN? in textbook I do LO(2) and I get the second element of the list L0, if I try the same in RPN I get an error.


RE: RPN save stack to list - toml_12953 - 11-06-2015 04:33 PM

(11-06-2015 09:48 AM)retoa Wrote:  How do you address a list element in RPN? in textbook I do LO(2) and I get the second element of the list L0, if I try the same in RPN I get an error.

In RPN, you put the arguments on the stack then call the function (or reference the list element) with the number of arguments in the parentheses. In your example there's only one argument so 2 goes on the stack and the 1 goes in the parentheses:

2
press Enter
L0(1)
press Enter


RE: RPN save stack to list - retoa - 11-06-2015 09:55 PM

OK, I see, as parameter you pass to the functions how many arguments they have to take from the stack.

Thank you very much for the help, this clarifies me many things.