newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
|
10-26-2017, 05:36 PM
Post: #205
|
|||
|
|||
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
Here's an example of a newRPL program, a version of VISIT, that I haven't figured out how to do properly without changing a list into a program. If anyone can suggest a more efficient way I've missed, I'd welcome it:
<< DUP RCL IF DUP TYPE 28 == THEN DROP2 ELSE SWAP OVER "VISITBKUP" SDSTO { "EN" DELKEY STOXP } ADD LXP "EN" 0 ASNKEY "DN" KEYEVAL END >> STOXP stands for STOre with eXtreme Prejudice, and will STO into a variable even if it is locked. LXP is a name in the same spirit as AXL. It changes lists to programs and vice versa. The only annoyance in this version of VISIT is that it seems to get the timing wrong at times, exiting the editor without having done DELKEY, leaving the edited object on the stack. If you press Enter again immediately, this will then store it properly. If you don't, you're asking for trouble, which is why I took the trouble of storing a backup on the SD card. Likewise, if you exit the editor with ON, you'll have to press Enter immediately. It seems one can't add user keys to ON, which is probably wise, though unfortunate in this instance. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)