Post Reply 
Walkthrough of an RPL program for an RPN programmer
08-19-2018, 08:08 PM
Post: #16
RE: Walkthrough of an RPL program for an RPN programmer
(08-19-2018 07:02 PM)Albert Chan Wrote:  Expression -> x y z << ... >>, the overloaded symbol were ->, not << ... >> ?

I would show the syntax a different way:
Code:
on the stack prior to execution:
n: <arg1>
n-1: <arg2>
...
1: <argn>

syntax of "→":
→    <local_ID_1>...<local_ID_n>    «...» | '...'

The → operator requires the same quantity of arguments already present on the stack as there are local IDs between it and the object to execute. "→" is overloaded to accept either a code object or an algebraic object as the final element in its syntactical structure. By definition, "→" executes that final object within the context of the locals that it "owns". After that final object is executed, the supplied locals are released by "→", and execution continues with the next item in the program stream after the executable object (which could be anything, including a '»' that would signal the end of the current program stream).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Walkthrough of an RPL program for an RPN programmer - DavidM - 08-19-2018 08:08 PM



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