Loop structures: Difference between revisions

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