HP Forums

Full Version: userRPL MAP command observations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I used the MAP command very rarely, and I forgot it wanted to change flags, although the 50g advanced user guide v2 manual doesn't tell anything about flags to be set (normally there is a remark about flags).

While searching the web in the hope that someone talked about it, I found this somewhat interesting conversation from 2002: https://groups.google.com/g/comp.sys.hp48/c/84oio2JknbQ (that went off topic after a bit).
I did not know that MAP affected flags. Which ones?

MAP is also slow, even compared to DOLIST which isn't very fast. Here is a fast replacement for MAP using ListExt commands. It works for matrices or vectors but not for lists. It does not change the type of the array. The function can be a program, a list or a null-tagged object.


\<< SWAP OBJ\-> DUP \-> s
Thanks John for sharing, I'll put it in the collection of code snippets (see wiki4hp). I am not entirely sure which flags it wanted to change, as when I used it today in a program there was a popup asking me flags changes and I clicked cancel. Then I remembered that in the past I used the procedure store the flags, change what map wanted, and then recall the flags again.

For reference, the program was like


InputList @ a list of reals if I am not wrong
   IF @yes, IFTE would work too
      maxValue >

update: added the code here http://www.wiki4hp.com/doku.php?id=rpl:start under JKMAP
Reference URL's