home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / while.n < prev   
Encoding:
Text File  |  1994-12-17  |  1.3 KB  |  38 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) while.n 1.2 94/12/17 16:19:14
  9. '\" 
  10. .so man.macros
  11. .HS while tcl
  12. .BS
  13. '\" Note:  do not modify the .SH NAME line immediately below!
  14. .SH NAME
  15. while \- Execute script repeatedly as long as a condition is met
  16. .SH SYNOPSIS
  17. \fBwhile \fItest body
  18. .BE
  19.  
  20. .SH DESCRIPTION
  21. .PP
  22. The \fIwhile\fR command evaluates \fItest\fR as an expression
  23. (in the same way that \fBexpr\fR evaluates its argument).
  24. The value of the expression must a proper boolean
  25. value; if it is a true value
  26. then \fIbody\fR is executed by passing it to the Tcl interpreter.
  27. Once \fIbody\fR has been executed then \fItest\fR is evaluated
  28. again, and the process repeats until eventually \fItest\fR
  29. evaluates to a false boolean value.  \fBContinue\fR
  30. commands may be executed inside \fIbody\fR to terminate the current
  31. iteration of the loop, and \fBbreak\fR
  32. commands may be executed inside \fIbody\fR to cause immediate
  33. termination of the \fBwhile\fR command.  The \fBwhile\fR command
  34. always returns an empty string.
  35.  
  36. .SH KEYWORDS
  37. boolean value, loop, test, while
  38.