Post Reply 
[newRPL] interested in RPN mode?
10-19-2019, 06:45 PM
Post: #10
RE: [newRPL] interested in RPN mode?
(10-18-2019 10:17 PM)rprosperi Wrote:  As long as the stack is 'trimmed' to 4 levels after processing, it sounds interesting.

And by 'check after executing each command' does this mean each newRPL-native command, or would it include previously-defined newRPL prograns/commands already in the user's path? If the latter, then I suppose one could mix newRPL commands into newRPN commands and programs, so extended-stack manipulation components can be used (Matrices, Lists, etc.) as needed, returning simpler results to be consumed in the newRPN program.

Is that what you're thinking?

When I say each command, I mean each step in a program.
<< 1 2 3 4 5 >> would push a 1, then check, then push 2, check, 3, check, 4, check, then when pushing 5 there will be 5 elements on the stack, and the next check will trim the stack back to 4 elements. This allows all commands to work the same way in RPN or RPL mode.
User programs would always have the stack trimmed after each step, internal commands (which take a single step) have access to the infinite RPL stack internally,and they may return more than 4 elements in the stack, but there will be a stack check and trim happening.
So if a command returns more than 4 elements, you can simply switch to RPL or 8 level stack to get the full results.
In the background it's RPL commands doing the job, so you can work with large matrices, lists, etc.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [newRPL] interested in RPN mode? - Claudio L. - 10-19-2019 06:45 PM



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