UCMDs: Documententation and implementation do not match...
3 posts
• Page 1 of 1
UCMDs: Documententation and implementation do not match...
UserCommands.1.21.pdf states on page 9:
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?
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?
-
MBaas - Posts: 156
- Joined: Thu Oct 16, 2008 1:17 am
- Location: Gründau / Germany
Re: UCMDs: Documententation and implementation do not match.
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.
So the doc is already correct.
If you put anything else in Parse THEN the parsing rules in it will apply.
- DanB|Dyalog
Re: UCMDs: Documententation and implementation do not match.
Ok, thanks - I see I should update my doc-links ;-)
-
MBaas - Posts: 156
- Joined: Thu Oct 16, 2008 1:17 am
- Location: Gründau / Germany
3 posts
• Page 1 of 1
Return to Source Code Management
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group