Post Reply 
newRPL: Named subroutines proposal
10-15-2015, 12:07 AM (This post was last modified: 10-15-2015 12:16 AM by Helix.)
Post: #9
RE: newRPL: Named subroutines proposal
(10-14-2015 04:43 PM)Claudio L. Wrote:  DEFINE is not implemented yet, but will be implemented (but it doesn't count as an improvement to RPL, it has been there forever).

DEFINE has been there forever, but I didn't know it was possible to use this command to define a variable. I don't think it's documented in the user's guide, only in the AUR.

(10-14-2015 04:43 PM)Claudio L. Wrote:  Regarding flag -3: here you have another perfect example why I dislike commands that depend on system flags.

I have similar thoughts than Han. I don't consider flags as a drawback. If we decide to suppress flags, then we have no other choice than multiplying the number of commands, as it was discussed previously about trig functions. What is gained somewhere is lost elsewhere.

However, I can understand that in some cases avoiding flag dependence can be interesting.
I find NUMDEFINE a bit long for a command. Instead, what about ASSIGN ? There is already the command UNASSIGN that purges global variables, so ASSIGN would make sense. In the same way, LASSIGN would create local variables.

(10-14-2015 04:43 PM)Claudio L. Wrote:  DEFINE works best when defining functions, and in that case, it works regardless of the flag, but if you define only a variable, it wants to evaluate the expression first and fails.

Well, if flag -3 is set, and at least one variable in the algebraic expression doesn't exist, then DEFINE fails, but it's normal. I suppose the same thing would happen with ASSIGN (or NUMDEFINE) in such a case.

Jean-Charles
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: Named subroutines proposal - Helix - 10-15-2015 12:07 AM



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