hi there,<br>
<br>
i'm new to tcl/tk and am learning this language, i know this is a silly question, but i just can't fix the<br>
problem. look at the following lines.<br>
<br>
set i 100<br>
set ok [myProc $i]<br>
<br>
proc myProc {n} {<br>
puts i'm in myProc, n is $n<br>
}<br>
<br>
when i run this script, i got <br>
<br>
invalid command name "myProc"<br>
while executing<br>
"myProc $i"<br>
invoked from within<br>
"set a [myProc $i]"<br>
(file "test.tcl" line 2)<br>
<br>
what wrong with this script, i just can't find out.
<br>
i'm new to tcl/tk and am learning this language, i know this is a silly question, but i just can't fix the<br>
problem. look at the following lines.<br>
<br>
set i 100<br>
set ok [myProc $i]<br>
<br>
proc myProc {n} {<br>
puts i'm in myProc, n is $n<br>
}<br>
<br>
when i run this script, i got <br>
<br>
invalid command name "myProc"<br>
while executing<br>
"myProc $i"<br>
invoked from within<br>
"set a [myProc $i]"<br>
(file "test.tcl" line 2)<br>
<br>
what wrong with this script, i just can't find out.