I would like to ask a question regarding TCL.
Let say I have an instance 111 and under this 3 instances (11100, 11102, 11103) are attached. You may say 11100, 11102, 11103 are id's and then there are names attached to these ids such as A, B, C.
At the moment I got all these ids 11100, 11102, 11103 how can use these ids in loop to iterate in loop for three time so I can find each ids name.
This is how you can iterate loop over the ids what you already have,
foreach i {11101 11102 11103} {
puts $i
;# do what ever with i
}
Another option what you said is you have three variable A B C,
lappend list $A $B $C
foreach i $list {
puts $i
;# do what ever with i
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With