[ANN] Simple RPN Calculator on RevOnline

DunbarX at aol.com DunbarX at aol.com
Wed Oct 13 17:44:44 EDT 2010


Andre.

All four registers, x,y, z and t are identical, and reside in a single LIFO 
stack:

T
Z
Y
X

"X" is the register that is visible. The upper ones are above it, take a 
tiny bit of getting used to, and then unleash their power.

One enters data from the keyboard into "x". "Enter" simply says: terminate 
data entry, and move the data in "x" to "y", "y" to "z" and "z" to "t" (t is 
lost). Any operator, like "+" says: add y to x, leave the answer in x; move 
"z" to "y", move "t" to "z" and leave a copy of "t" in "t".

There is a "switch x and y" button, and a "rollDown" button, that shifts 
data downward, one register to another, and passes "x" back up to "t".

That's it. That's all one needs.

Craig



More information about the Use-livecode mailing list