Post Reply 
Getting values from stack
10-28-2020, 10:47 PM (This post was last modified: 10-28-2020 10:53 PM by Stevetuc.)
Post: #3
RE: Getting values from stack
(10-28-2020 07:06 PM)Francesco Wrote:  Hi to all
I'm new in HP PPL programming. I wrote a simple program that have as inputs two variables:
EXPORT myprog(value1,value2)
BEGIN
....
END

and it works fine. Running this program appears two edit box for variable insertion. How can I get these variables from stack ? That is I insert two values on stack and I want to give them as input to myprog.
regards

Not exactly what you asked for, but you can directly access RPN stack levels in your program without passing them as parameters. So something like this will work if called from home screen with 2 values on the stack:

EXPORT myprog()
BEGIN
Ans(1)*Ans(2) // eg. return stack1 x stack2
END;

It also works in textbook and algebraic entry modes and when run from program catalog
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Getting values from stack - Francesco - 10-28-2020, 07:06 PM
RE: Getting values from stack - pinkman - 10-28-2020, 08:47 PM
RE: Getting values from stack - Stevetuc - 10-28-2020 10:47 PM



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