Post Reply 
(RPL) percentage function % not preserving stack level 2
01-05-2019, 12:53 AM (This post was last modified: 01-05-2019 12:55 AM by Joe Horn.)
Post: #2
RE: (RPL) percentage function % not preserving stack level 2
IMHO, Y was preserved in the 4-level RPN machines (after performing the % function) due to the very limited size of the stack. Since RPL machines have no such limitation, and since LASTARG returns both X and Y, there is no need for the function to preserve Y on the stack; the user is free to make as many copies as needed of any stack levels.

What is X plus Y%?
RPN: X ENTER Y % +
RPL: X DUP Y % +

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (RPL) percentage function % not preserving stack level 2 - Joe Horn - 01-05-2019 12:53 AM



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