home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
tcl_447.lzh
/
TCL
/
tcl.lzh
/
tcl
/
help
/
if
< prev
next >
Wrap
Text File
|
1990-05-03
|
750b
|
15 lines
if test [then] trueBody [[else] falseBody]
The if command evaluates test as an expression (in the
same way that expr evaluates its argument). If the
result is non-zero then trueBody is called by passing
it to the Tcl interpreter. Otherwise falseBody is
executed by passing it to the Tcl interpreter. The
then and else arguments are optional ``noise words'' to
make the command easier to read. FalseBody is also
optional; if it isn't specified then the command does
nothing if test evaluates to zero. The return value
from if is the value of the last command executed in
trueBody or falseBody, or the empty string if test
evaluates to zero and falseBody isn't specified.