Hello
I am trying to call a procedure, whose name is in a variable and having some arguments in a separate variable.
set result [$proc1 $com_line]
where $proc1 contains the name of the procedure, doesn't work. The arguments don't get supplied to the procedure.
A tried numerous variants and the best was:
set result [eval [concat $proc1 $com_line]]
This works but runs through the procedure twice. The first time with the correct arguments, but the second time with some unexpected arguments.
How can I correct this "apparently" simple task?
Thanks
I am trying to call a procedure, whose name is in a variable and having some arguments in a separate variable.
set result [$proc1 $com_line]
where $proc1 contains the name of the procedure, doesn't work. The arguments don't get supplied to the procedure.
A tried numerous variants and the best was:
set result [eval [concat $proc1 $com_line]]
This works but runs through the procedure twice. The first time with the correct arguments, but the second time with some unexpected arguments.
How can I correct this "apparently" simple task?
Thanks