Example:
set t "0.1 0.2 0.3" set i 0; foreach j $t { puts "$j is element number $i of list t" incr i; }
Result:
0.1 is element number 0 of list t 0.2 is element number 1 of list t 0.3 is element number 2 of list t
Jan 5, 2022 | tcl | 0 comments
Example:
set t "0.1 0.2 0.3" set i 0; foreach j $t { puts "$j is element number $i of list t" incr i; }
Result:
0.1 is element number 0 of list t 0.2 is element number 1 of list t 0.3 is element number 2 of list t
Subscribe now to keep reading and get access to the full archive.
Recent Comments