Post Reply 
Access RPN stack result in PPL program?
09-05-2014, 06:45 PM (This post was last modified: 09-05-2014 06:56 PM by John R. Graham.)
Post: #3
RE: Access RPN stack result in PPL program?
(09-04-2014 10:26 PM)gbh Wrote:  How do I access the value in the lowest level of the RPN stack (x, level 1) in a PPL program?
...
There is some access through the PPL function parameter and return value mechanisms. For example,
Code:
EXPORT ADD2(X,Y)
BEGIN
  RETURN X+Y;
END;
This program pops two values off of the stack, which end up in the variables X and Y, operates on those variables and returns the result, which is then pushed back onto the stack.

However, there's no ability to arbitrarily manipulate the stack outside the parameter / return mechanism. This is a capability I would sorely like to be added to the Prime: the stack needs to be a first-class citizen across the calculator.

- John
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Access RPN stack result in PPL program? - John R. Graham - 09-05-2014 06:45 PM



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