Post Reply 
Evaluation of variables in 50g
05-22-2014, 09:31 PM
Post: #6
RE: Evaluation of variables in 50g
(05-21-2014 03:39 PM)kakima Wrote:  Okay, I think I see your point about my ellipsis.
Yeah, I meant it as a joke, since you cut the sentence just when it was starting to get interesting!

(05-21-2014 03:39 PM)kakima Wrote:  The key phrase is "... the object stored in the corresponding variable is itself evaluated" where, as you point out in your later post, the evaluation depends on the type of the object. Algebraics clearly fall into the "Other objects are put on the stack" category.

As to why this is so, instead of the algebraic getting evaluated, the only thing that pops to mind at this time is to be consistent. Putting an algebraic onto the stack does not cause it to be evaluated, whether it was just typed in or recalled from a variable. But that's just a theory, since I had nothing to do with the development of RPL.

I don't know the reasons, but I suspect speed of execution being the cause, so they don't try to evaluate trivial things like numbers.
In any case, I think from the perspective of a user trying to learn the language, it's better to give one rule for all cases: "when a name is evaluated, its contents will be recalled to the stack and evaluated", doesn't matter what type of object, and also doesn't matter whether it's a global or local. Then if you want the content to be recalled but not evaluated, then just use RCL.
The question now is whether this will cause a nightmare to port programs from userRPL to newRPL, or if this will be acceptable.

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


Messages In This Thread
RE: Evaluation of variables in 50g - Claudio L. - 05-22-2014 09:31 PM



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