Post Reply 
Accessing / Manipulating RPN Stack from PPL
02-20-2014, 09:05 PM
Post: #5
RE: Accessing / Manipulating RPN Stack from PPL
(02-20-2014 06:40 PM)Han Wrote:  
(02-20-2014 05:10 PM)John R. Graham Wrote:  Okay, thank you. I couldn't find a single example in the officical documentation that described that, although perhaps I missed something else that has been written.

Stack maipulation functions would still seem to be necessary, unless the RETURN statement also has some not fully elucidated syntax to return multiple results. As far as I can easily tell, functions only return one object, right?

- John

Since programs are still "regular" (in the sense of non-RPL), then there really is no immediate need for stack manipulations within a program. This would only be necessary if there were no mechanisms for storing intermediate values -- but we have local variables for that (and they can be created as-needed). If you have multiple results to return, just return a list: RETURN({a,b,c,d}) and the list can contain elements of different types.

Hi,

And there is where a command like OBJ-> would be logical to have. Of course, you can always extract, one by one, the elements from the list but it is more cumbersome. If there is already ->LIST, why not OBJ->?

Regards,

Miguel
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Accessing / Manipulating RPN Stack from PPL - Miguel Toro - 02-20-2014 09:05 PM



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