Post Reply 
newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
11-05-2017, 01:04 AM (This post was last modified: 11-05-2017 01:06 AM by Claudio L..)
Post: #233
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
(11-04-2017 05:17 AM)Claudio L. Wrote:  I'll comment on what's new in this ROM tomorrow, just wanted to give a heads-up in case somebody notices the files were updated and tries to flash them.

Few things to play with in this ROM:
  • STO and RCL support for absolute paths using list of lists {{ }} for the paths.
  • New EXIT command needs thorough testing (see below for explanation)
  • IFT and IFTE were updated to use the ISTRUE operator, need thorough testing.
  • New system flags to allow keyboard handler chaining.

The EXIT command:
  • Will exit the current program, returning to the caller (not completely stopping RPL like KILL on the 50g)
  • Inside a loop, it exits the loop
  • Not affected by IF/CASE/IFERR, so it exits the program or loop in which the IF/CASE statement is in.

The new keyboard handler flags (I know who's going to like this Smile
Flag -46 (FL_DODEFAULTKEY), is set to zero by the system right before calling a custom key handler. If the handler sets this flag to 1, the system will execute the default key handler immediately after.
Flag -45 (FL_NEXTCUSTOMKEY), is set to zero by the system right before calling a custom key handler. If the handler sets this flag to 1, the system will continue to look for another handler for the same key and run it.

An example:
<< 1 -46 SF >> "+" 0 ASNKEY
This handler puts a 1 on the stack, then sets flag -46 to indicate the default handler should be executed. Put a number on the stack, and pressing + will do << 1 >> << + >>, so it will be increased.

Now define another handler to chain the previous one:
<< 2 / -45 SF >> "+" 0 ASNKEY
Putting a number 4 on the stack and pressing + will do << 2 / >> << 1 >> << + >>, resulting in 3. The first handler will chain to the second one, which will chain to the default key.
To clean up this you'll need to remove both handlers with "+" DELKEY "+" DELKEY, since handlers will be erased one by one.
I think this makes for a huge improvement in key handler flexibility.

EDIT: In case you mess up your key definitions badly, you can disable custom keys through the menu (System/Keys) and programmatically setting flag -4.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25] - Claudio L. - 11-05-2017 01:04 AM



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