Post Reply 
Truly sadden by my Prime purchase - status/plans for RPN support?
07-07-2021, 08:57 PM
Post: #7
RE: Truly sadden by my Prime purchase - status/plans for RPN support?
(07-07-2021 04:17 AM)kevinwaite Wrote:  As it stands 'right now':
- user defined key requires the extra ENTER to execute?
- user functions cannot access the current stack in any way?
- user programs cannot access the current stack in any way, but can return a single object/value to the entry line.


Best regards,
-Kevin Waite

In this demo program I read 4 levels of the stack , multiply them by 2 , and pass the results back to 4 stack levels, pushing the original data up.
A user key allows to return a string unquoted to the command line. Pressing enter then executes the contents of the string.
By passing a string such as " s4 s3 s2 s1" ,the vars are each sent to a level of the stack.

To run , enter data into 4 stack levels, then <shift user 4> and <enter>


Code:

EXPORT s4,s3,s2,s1;
KEY K_4()
BEGIN
2▶Entry;
Ans(1)*2▶s1; 
Ans(2)*2▶s2; 
Ans(3)*2▶s3;
Ans(4)*2▶s4;
RETURN "s4 s3 s2 s1";
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Truly sadden by my Prime purchase - status/plans for RPN support? - Stevetuc - 07-07-2021 08:57 PM



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