RPN stack I/O from PPL
|
05-16-2018, 06:15 AM
Post: #1
|
|||
|
|||
RPN stack I/O from PPL
Here is a workaround to allow reading and 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 »
|
User(s) browsing this thread: 1 Guest(s)