UCMDs: Documententation and implementation do not match...

SALT, SPICE, Subversion, etc...
Post Reply
User avatar
MBaas
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany
Contact:

UCMDs: Documententation and implementation do not match...

Post by MBaas »

UserCommands.1.21.pdf states on page 9:
When your command is used, your function will only be called if the arguments and
switches comply with the rules that you have declared. The framework will package
the argument and switch(es) into a namespace and pass this as the second element of
the argument to RunArgin our example.

However, when running a cmd that has an empty parse-string (i.e. no arguments, so that "optional" arguments might be used "If you don‟t declare the number of arguments, any number of arguments will be accepted (including 0)."), the "Arg" that is passed to Run is a string (containing everything entered after the name of the command), not a namespace.

So...are u going to adopt the doco or modify the program?
DanB|Dyalog

Re: UCMDs: Documententation and implementation do not match.

Post by DanB|Dyalog »

Page 9 of the V13 doc says: "The Spice framework upon which user commands is built allows you to define switches that your command will accept. If the Parse element for your command is empty (as defined in your List function), Run„s 2nd argument will simply contain everything following the command name, and you can interpret it any way you like".

So the doc is already correct.

If you put anything else in Parse THEN the parsing rules in it will apply.
User avatar
MBaas
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany
Contact:

Re: UCMDs: Documententation and implementation do not match.

Post by MBaas »

Ok, thanks - I see I should update my doc-links ;-)
Post Reply