From: Andreas Möller on 17 Sep 2009 04:08
does somebody know, how one can create a named ROMPTR (xNAME - a
command that is visible in the library menu) that is not allowed in a
This is what Id like to accomplish:
Create a library with a xNAME and if this xNAME is used in a USER-RPL
program the command line parser should give an error.
Example: << My_xNAME >> [ENTER] -> the command line parser errors with
"Invalid Syntax" and the cursor is placed behind the invalid My_xNAME
in the command line.
Can the Property-List Bits in front of a ROMPTR be used for this ?
(remove the NOSPAM for a direct answer)
From: Yann on 17 Sep 2009 13:35
Do you mean you want to create a Library Command which can be
triggered using the Library menu only,
but not called by any UserRPL program, including any direct call on
the stack ?
In that case, you may separate your library program into 2 parts
(visible - invisible).
The visible part (with the name) is only there for :
1) checking that the triggering is valid.
Typical example :
- the library menu is the current menu,
- the key corresponding to the library command has been pressed
- return stack has no reference to an ongoing ID program
2) if ok, then call the invisible part, which starts the real job.
The invisible part, of course, will remain unaccessible from UserRPL.
From: andreas_moellerNOSPAM on 17 Sep 2009 14:00
that could do the job I need.
Do you mind giving an example ?
From: Yann on 20 Sep 2009 16:53
by the way, i was thinking :
there might be a more straightforward
by going the Assembler route
and testing directly if the expected key is being pressed
right at the start.
Normally, this should be fast enough to not even be noticed by the
Do you have some experience at programming in saturn assembler ?
From: andreas_moellerNOSPAM on 20 Sep 2009 17:57
> Do you have some experience at programming in saturn assembler ?
Yes, one could say though although I did not bother much with key
input/output so far.
> and testing directly if the expected key is being pressed
> right at the start.
Hmm, the key could be any of the six soft menu keys and also the
command name could be entered through the command line.
Easiest is to use the sNAME directive and add an invisible space
character at the end like
sNAME NameIt NameIt\20
So the real name of the xNAME would be NameIt\20 which can not be
entered and the command line parser will always create NameIt from it
which is not the ROMPTR.
However, no message is generated, like "not allowed as a command" or
Thanks for you thoughts, if you come up with a ML solution I would be