Ray, you are correct about the possibility that some code is relying on this and this is the reason for this post: how many people think this would change their life?
In my experience very few but I'd like to know.
About your thinking assumptions: for the most you are also correct:
arguments come before modifiers but there are no OPTIONAL trailing arguments (although you can specify a range of arguments, say 3 to 5).
The same rule would apply to ⎕SE.UCMD and the example would become (note the quotes around mod2's value)
Code: Select all
⎕SE.UCMD 'foo arg1 ''arg 2'' -mod1 -mod2="1 2 3" -mod3=abc'
The parser does not try to interpret modifier (or argument) values and always returns a string. (Note the function Switch, returned in the result of the Parse method, still allows you to turn those values into numbers). This would remain the same.
After the change the parser would now return 4 arguments instead of 2 and mod2 would contain ,'1' instead of '1 2 3' as you predicted. Subject to the ucmd parsing rules of course (it could now be rejected if, e.g. the number of arguments was set to 2).
Current user commands call themselves but this problem does not present itself. That would be safe.
/Dan