Post Reply 
[HP 50g] Evaluation in algebraics
09-13-2014, 06:45 PM
Post: #2
RE: [HP 50g] Evaluation in algebraics
(09-13-2014 01:32 PM)ettlz Wrote:  Is there any way for a program to tell if it's being evaluated from within an 'algebraic' as opposed to another RPL « program » or directly on the stack?

Don't know of any way to do this that uses standard system commands. Perhaps someone else does...

(09-13-2014 01:32 PM)ettlz Wrote:  Also, it seems that when evaluating a (user) function, the 50g clears the stack before evaluating the function, packs what's left into a list, and restores the original stack with that results list pushed to Level 1. How is this done (and where is the stack's prior content held)?

The developers of the Metakernel (used on the 49-50) came up with a concept they called a "Virtual Stack". There's a SysRPL API that includes a variety of Virtual Stack commands. Among other things, it allows a System RPL program to save/restore/manipulate the normal user stack as a single object in a virtual "stack of stacks". See this documentation (chapter 23) for a more complete description. You would need to be using SysRPL to access the Virtual Stack commands.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[HP 50g] Evaluation in algebraics - ettlz - 09-13-2014, 01:32 PM
RE: [HP 50g] Evaluation in algebraics - DavidM - 09-13-2014 06:45 PM



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