Control Structures



C-like appearance.
Just commands that take Tcl scripts as arguments.
Example: list reversal
set b "" set i [expr [llength $a] - 1] while {$i >= 0} { lappend b [lindex $a $i] incr i -1 }
Commands:
if foreach
for while
switch eval
break continue

Previous slide Next slide Back to the index View Graphic Version

Notes:

No notes for slide 12