home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
tcl_447.lzh
/
TCL
/
tcl.lzh
/
tcl
/
help
/
foreach
< prev
next >
Wrap
Text File
|
1990-05-03
|
580b
|
13 lines
foreach varname list body
In this command, varname is the name of a variable,
list is a list of values to assign to varname, and body
is a collection of Tcl commands. For each field in
list (in order from left to right), foreach assigns the
contents of the field to varname (as if the index
command had been used to extract the field), then calls
the Tcl interpreter to execute body. The break and
continue statements may be invoked inside body, with
the same effect as in the for command. Foreach an
empty string.