Accessing / Manipulating RPN Stack from PPL
|
05-14-2018, 09:08 PM
(This post was last modified: 05-15-2018 05:24 PM by Stevetuc.)
Post: #6
|
|||
|
|||
RE: Accessing / Manipulating RPN Stack from PPL
Here is a workaround to allow writing back to multiple stack locations from PPL
It uses the fact that a key definition returns a string to the command line without quotes. So RETURN "stack1 stack2 stack3 stack4" will place those vars onto the lowest 4 stack levels on pressing <ENTER> In the code below , global vars are created to hold the stack values. Ans(1) to Ans(4) are used to pop 4 values from the stack. a sample routine then takes the factorial of the stack values. on pressing SHIFT User 0, stack4 stack3 stack2 stack1 is placed on the command line, and <ENTER> pushes them onto stack. try this: Home screen RPN mode place on stack: 2 <ENTER> 4 <ENTER> 6 <ENTER> 8 <ENTER> Shift User 0 stack4 stack3 stack2 stack1 is returned <ENTER> 2 24 720 40320 is returned to the stack Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Accessing / Manipulating RPN Stack from PPL - John R. Graham - 02-20-2014, 04:56 PM
RE: Accessing / Manipulating RPN Stack from PPL - Han - 02-20-2014, 05:05 PM
RE: Accessing / Manipulating RPN Stack from PPL - John R. Graham - 02-20-2014, 05:10 PM
RE: Accessing / Manipulating RPN Stack from PPL - Han - 02-20-2014, 06:40 PM
RE: Accessing / Manipulating RPN Stack from PPL - Miguel Toro - 02-20-2014, 09:05 PM
RE: Accessing / Manipulating RPN Stack from PPL - Stevetuc - 05-14-2018 09:08 PM
|
User(s) browsing this thread: 1 Guest(s)