DOC HOME
SITE MAP
MAN PAGES
GNU INFO
SEARCH
while(TCL)
while -- execute script repeatedly as long as a condition is met
Syntax
while
test body
Description
The
while
command evaluates
test
as an expression (in the same way that
expr
evaluates its argument). The value of the expression must be a proper boolean value; if it is a true value then
body
is executed by passing it to the Tcl interpreter. Once
body
has been executed then
test
is evaluated again, and the process repeats until eventually
test
evaluates to a false boolean value.
continue
commands may be executed inside
body
to terminate the current iteration of the loop, and
break
commands may be executed inside
body
to cause immediate termination of the
while
command. The
while
command always returns an empty string.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003