 |
» |
|
|
|
The rules for the user command header (PARM line and OPTIONs) have been
relaxed, command files can now be variable record width files (UDCs still
cannot), and a new parameter type, ANYPARM, supports syntax-free user
commands. The reserved words PARM, ANYPARM and OPTION begin statements which
constitute the user command header. For UDCs only, parameters may be
defined in the same line as the UDC name, with additional parameters
described in subsequent PARM or ANYPARM lines. Parameter and option
lines may be interspersed. There is a limit of 255 parameters per user
command. If ANYPARM is specified it must be the last parameter
definition statement, meaning that PARM cannot follow an ANYPARM
declaration. The user command header is terminated by the first
non-PARM, non-ANYPARM, non-OPTION record. For example: OPTION logon PARM flag=" doit | PARM p1, p2=hi PARM p3=there OPTION nohelp doit | OPTION list PARM p1 PARM p2="what's up, doc?" ANYPARM p3=what's up, doc? |
ANYPARM |  |
ANYPARM causes all normal delimiters to be ignored. That is,the meaning and delimiters
are now considered part of the parameter's value. This definition forces
ANYPARM to be the last parameter declared, since the equal sign (=), comma (,),
semicolon (;), quotes ("), etc. are treated as part of the ANYPARM parameter's
value. A benefit of ANYPARM can be seen in the following example:
MYTELL user, word1=",w2=",w3=",w4=",w5=",w6=",w7=",w8=",w9=",w10="
tell !user; !hpdatef (!hptimef) — !word1 !w2 !w3 !w4 !w5 !w6 !w7 !w8 !w9 !w10
***
:mytell zinta.ui This will work; however, we may need some better examples?
FROM/S505 JEFF.UI/MON, OCT 30, 1989 ( 3:11 PM) — This will work however we...
|
 |  |  |  |  | NOTE: A longer message requires quoting, and the ";" and "," are lost
since they are delimiters. |  |  |  |  |
Then with the use of ANYPARM.
MYTELL user
ANYPARM message=<no message>
tell !user; !hpdatef (!hptimef)— !message
***
:mytell mikep.uis Will woff;tr,i,d;lev 0,1;mr sp sp-40;mr pc r2 work??
FROM/S505 JEFF.UI/MON, OCT 30, 1989 ( 3:11 PM) — Will woff;tr,i,d;lev 0,1;...
|
The first example is limited to 10 words, unless quoting is used. The
ANYPARM version does not require the user to quote or count parameters,
and all normal delimiters are ignored, and thus treated as data.
|