The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Prime: Placing more than 1 item on the RPN stack in a single program?
Message #1 Posted by John Colvin on 18 Nov 2013, 8:37 p.m.

I am trying to write a program that decomposes a list and places the elements on the stack in RPN mode. The RETURN command apparently can only place one item on the stack and then exits the program. Is there a way to put more than one item on the stack from within a single program?

      
Re: Prime: Placing more than 1 item on the RPN stack in a single program?
Message #2 Posted by Helge Gabert on 18 Nov 2013, 8:46 p.m.,
in response to message #1 by John Colvin

Currently . . . not to my knowledge.

(That is only one of the reasons why I keep using the 50G for *real* work, and the HP Prime just for fun!)

            
Re: Prime: Placing more than 1 item on the RPN stack in a single program?
Message #3 Posted by John Colvin on 18 Nov 2013, 9:26 p.m.,
in response to message #2 by Helge Gabert

I was afraid of that. The limited functionality of RPN in the HP Prime has renewed my fondness for my old HP49G+.

      
Re: Prime: Placing more than 1 item on the RPN stack in a single program?
Message #4 Posted by Joe Horn on 18 Nov 2013, 10:23 p.m.,
in response to message #1 by John Colvin

Quote:
Is there a way to put more than one item on the stack from within a single program?
Yes and no. On separate stack levels: no. As a list containing multiple items: yes. Some of my programs return lists for exactly that reason: I want more than a single output. It's not what we REALLY want, but at least it works.

Another option is for the program to store results in variables. Big upside: you can use them in further calculations with very few keystrokes (e.g. ALPHA A). Big downside: You don't see them immediately.

            
Re: Prime: Placing more than 1 item on the RPN stack in a single program?
Message #5 Posted by Miguel Toro on 19 Nov 2013, 8:59 a.m.,
in response to message #4 by Joe Horn

Hi,

As I stated in similar post, it would be nice if at least 'OBJ->' were implemented in RPN entry. As it is now, you can compose a list (->LIST) but you cannot decompose it in RPN mode.

Regards,

Miguel


[ Return to Index | Top of Index ]

Go back to the main exhibit hall