home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / while.n < prev   
Text File  |  1993-06-16  |  2KB  |  51 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/while.n,v 1.1 93/06/16 16:48:27 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS while tcl
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. while \- Execute script repeatedly as long as a condition is met
  29. .SH SYNOPSIS
  30. \fBwhile \fItest body
  31. .BE
  32.  
  33. .SH DESCRIPTION
  34. .PP
  35. The \fIwhile\fR command evaluates \fItest\fR as an expression
  36. (in the same way that \fBexpr\fR evaluates its argument).
  37. The value of the expression must a proper boolean
  38. value; if it is a true value
  39. then \fIbody\fR is executed by passing it to the Tcl interpreter.
  40. Once \fIbody\fR has been executed then \fItest\fR is evaluated
  41. again, and the process repeats until eventually \fItest\fR
  42. evaluates to a false boolean value.  \fBContinue\fR
  43. commands may be executed inside \fIbody\fR to terminate the current
  44. iteration of the loop, and \fBbreak\fR
  45. commands may be executed inside \fIbody\fR to cause immediate
  46. termination of the \fBwhile\fR command.  The \fBwhile\fR command
  47. always returns an empty string.
  48.  
  49. .SH KEYWORDS
  50. boolean value, loop, test, while
  51.