1) I deliberately ignored all $null values. It just depends on the situation (his requirements) I guess... Apparently $0 also counts trailing null arguments in $id's, but not trailing spaces/null identifiers in /commands. So, that means there's no way to check for doubles when using the /command form.

A simple implementation of a script detecting $nulls would be alias alldifferent return $false $calc($0 + 1) $calc($0 + 2) smile

2) Yes, but your solution will still do the same when all ascii codes are used. :tongue: I did put it up front to let the OP choose the character of his liking.
3) It would be the %tok1 'th not-null argument, agreed that it's not $ $+ %tok1
4) I hope the OP will change it too, just wanted to return everything somewhat readably