Post Reply 
newRPL: Named subroutines proposal
10-14-2015, 04:43 PM
Post: #7
RE: newRPL: Named subroutines proposal
(10-13-2015 11:09 PM)Helix Wrote:  Here is another suggestion to make code more readable.

In RPL, code like A B SIN * C + 'Z' STO is not very clear.
There is an elegant solution, provided that the flag -3 is set:
(I must admit that I have discovered this possibility only today!)

It would be nice to have also the command LDEFINE, which would create a local variable, in the same way as LSTO. This would make newRPL more similar to modern languages, but still following the RPL syntax. Of course, there would be a cost in speed processing, but since newRPL is much faster than RPL, it could be interesting in most cases.

DEFINE is not implemented yet, but will be implemented (but it doesn't count as an improvement to RPL, it has been there forever).
LDEFINE would be a nice addition, and it will definitely be added.

Regarding flag -3: here you have another perfect example why I dislike commands that depend on system flags. 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. Doesn't make much sense to me, I'd rather have DEFINE to define it as the expression and perhaps NUMDEFINE if I want to run ->NUM before.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL: Named subroutines proposal - Claudio L. - 10-14-2015 04:43 PM

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