Free42 LSTO REGS
|
10-24-2019, 11:37 AM
Post: #14
|
|||
|
|||
RE: Free42 LSTO REGS
A more thorough approach to the problem of creating subroutines that look and behave like built-in functions might go like this:
First, a special kind of label, let's call it FLBL. This works just like a regular LBL, the difference being that a call to FLBL "FOO" is displayed as FOO, not XEQ "FOO". Second, an easy way to save and restore state. Saving state could be done by a new function FSAVE, possibly to be combined with FLBL, and it would save the stack registers, LASTx, ALPHA, and all flags. Restoring state would be done by a new function FRTN, with variants FRTN_U, FRTN_B, FRTN_E for functions that act like unary operators, binary operators, or return an error status, respectively. (Error status can also be used to implement conditionals; the special behavior of the "Yes" and "No" messages is part of the system already and it's how all the built-in conditionals are implemented.) Of course it gets more complicated, because what if a function is supposed to have multiple side effects? Third, because all this encourages the creation of large function libraries, the flat program space becomes an issue and directories are back on the agenda. Those same directories that were supposed to be unnecessary once easy state file switching was implemented. TL;DR Once you start thinking hard about extending RPN keystroke programming, all roads lead to RPL. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Free42 LSTO REGS - Epidiah - 09-25-2019, 03:52 PM
RE: Free42 LSTO REGS - David Hayden - 09-26-2019, 05:50 PM
RE: Free42 LSTO REGS - Guenter Schink - 09-26-2019, 08:10 PM
RE: Free42 LSTO REGS - Thomas Okken - 09-28-2019, 02:53 AM
RE: Free42 LSTO REGS - Thomas Okken - 09-28-2019, 03:19 AM
RE: Free42 LSTO REGS - Namir - 10-04-2019, 12:34 PM
RE: Free42 LSTO REGS - Paul Dale - 10-05-2019, 08:46 AM
RE: Free42 LSTO REGS - SammysHP - 10-21-2019, 09:31 AM
RE: Free42 LSTO REGS - Epidiah - 10-21-2019, 03:07 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-23-2019, 12:01 PM
RE: Free42 LSTO REGS - Epidiah - 10-23-2019, 02:22 PM
RE: Free42 LSTO REGS - Epidiah - 10-25-2019, 01:50 AM
RE: Free42 LSTO REGS - SammysHP - 10-25-2019, 07:17 PM
RE: Free42 LSTO REGS - Epidiah - 10-26-2019, 02:52 AM
RE: Free42 LSTO REGS - rprosperi - 10-23-2019, 01:38 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-23-2019, 11:51 PM
RE: Free42 LSTO REGS - Thomas Okken - 10-24-2019 11:37 AM
RE: Free42 LSTO REGS - Paul Dale - 10-24-2019, 12:26 PM
RE: Free42 LSTO REGS - Epidiah - 10-24-2019, 12:57 PM
RE: Free42 LSTO REGS - Werner - 10-25-2019, 06:21 AM
RE: Free42 LSTO REGS - Epidiah - 10-25-2019, 02:02 PM
|
User(s) browsing this thread: 2 Guest(s)