Post Reply 
newRPL: Named subroutines proposal
10-16-2015, 07:49 AM (This post was last modified: 10-16-2015 07:51 AM by Paul Dale.)
Post: #13
RE: newRPL: Named subroutines proposal
(10-15-2015 01:33 AM)Claudio L. Wrote:  And I agree 100%. That's exactly what flags are for. To control certain behaviors and preferences from the user.

For mode settings, the 34S uses individual named commands. We also made the decision early on that these flags setting commands do not impact user flags or user visible memory. The command names are far more meaningful than the numeric flags. You've already got some commands that do exactly this (DEG/RAD/GRAD e.g.). Mirroring a command name with some numeric flags is a throwback to the 1970s or 1980s when code and RAM was extremely tight.

I would wholeheartedly recommend that you use individual meaningful command names and have them operate on hidden memory. Also provide separate interrogation commands to query the current setting and a save/restore all settings command pair.


For a quick test what does flag 14 do on the HP-41? What about flag 49? Can you think of reasonable command names to set and clear these?


For the 34S we decided early on that numeric flags were exclusively for the user & we've resisted multiple attempts to hijack these. The lettered flags were originally also for the user, excepting the B and C flags which supported integer mode's overflow (big) and carry. The D and A flags got special meaning afterwards and then the number was increased to match the registers in order to support local registers and flags. The entire reason we had alpha flags is because 0 -- 99 plus A - D comes to a whole number of bytes.

Yes, I know RPL system flags have negative numeric values and user flags are positive, but a memorable command name is still much better.


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


Messages In This Thread
RE: newRPL: Named subroutines proposal - Paul Dale - 10-16-2015 07:49 AM



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