home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
tcl_447.lzh
/
TCL
/
tcl.lzh
/
tcl
/
help
/
for
< prev
next >
Wrap
Text File
|
1990-05-03
|
1KB
|
20 lines
for start test next body
For is a looping command, similar in structure to the C
for statement. The start, next, and body arguments
must be Tcl command strings, and test is an expression
string. The for command first invokes the Tcl
interpreter to execute first. Then it repeatedly
evaluates test as an expression; if the result is
non-zero it invokes the Tcl interpreter on body, then
invokes the Tcl interpreter on next, then repeats the
loop. The command terminates when test evaluates to 0.
If a continue command is invoked within body then any
remaining commands in the current execution of body are
skipped; processing continues by invoking the Tcl
interpreter on next, then evaluating test, and so on.
If a break command is invoked within body or next, then |
the for command will return immediately. The operation
of break and continue are similar to the corresponding
statements in C. For returns an empty string.