Hello,
Im beginer in TCL, and I have a problem about returning a several values from the proc. How to do if I have a proc which is executed in another proc in the loop. Simple example is below. And let say that I need every returned value from the second proc.
proc first {arg1 arg2} {
set sum [expr {$arg1+$arg2}]
return $sum
}
proc second{}{
for {set i 0} {$i < 100} {incr i} {
for {set j 0} {$j <100} {incr j} {
set result [first $i $j]
return $result
}
}
}
I found in this topic:
that i should do it by the list, but if I have a lot of increments in the loop then can I construct a big list? Please help me, or give me some information where I can looking for.
The best regards
kurdulla
Im beginer in TCL, and I have a problem about returning a several values from the proc. How to do if I have a proc which is executed in another proc in the loop. Simple example is below. And let say that I need every returned value from the second proc.
proc first {arg1 arg2} {
set sum [expr {$arg1+$arg2}]
return $sum
}
proc second{}{
for {set i 0} {$i < 100} {incr i} {
for {set j 0} {$j <100} {incr j} {
set result [first $i $j]
return $result
}
}
}
I found in this topic:
that i should do it by the list, but if I have a lot of increments in the loop then can I construct a big list? Please help me, or give me some information where I can looking for.
The best regards
kurdulla