Loop structures: Difference between revisions
Content added Content deleted
Line 543: | Line 543: | ||
[[Category:Tcl]] |
[[Category:Tcl]] |
||
=== foreach === |
=== foreach === |
||
foreach i {foo bar baz} { |
foreach i {foo bar baz} { |
||
puts "$i" |
puts "$i" |
||
} |
} |
||
=== for === |
|||
for {set i 0} {$i < 10} {incr i} { |
|||
puts $i |
|||
} |
|||
==[[UNIX Shell]]== |
==[[UNIX Shell]]== |