* aotto1968 <
[email protected]>
| should be
| proc block {args code} {
| ...
| }
| "args" always collect as much as possible arguments
| { args code } first set the defined "code" from the "end" and
| all remaining arguments got to "args"
Note that the TCL 'args' works differently: it is only 'magic' if it is
the *last* entry in the argument list.
https://www.tcl.tk/man/tcl8.6/TclCmd/proc.htm
(*emphasis* added by me) :
There is one special case to permit procedures with variable numbers of
arguments. If the *last* formal argument has the name “args”, then a
call to the procedure may contain more actual arguments than the proce-
dure has formal arguments. In this case, all of the actual arguments
starting at the one that would be assigned to args are combined into a
list (as if the list command had been used); this combined value is as-
signed to the local variable args.
HTH
R'
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)