diff options
Diffstat (limited to 'doc/while.n')
| -rw-r--r-- | doc/while.n | 12 | 
1 files changed, 5 insertions, 7 deletions
| diff --git a/doc/while.n b/doc/while.n index dcaf8fc..60275e8 100644 --- a/doc/while.n +++ b/doc/while.n @@ -5,10 +5,8 @@  '\" See the file "license.terms" for information on usage and redistribution  '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.  '\"  -'\" RCS: @(#) $Id: while.n,v 1.3.18.1 2004/10/27 14:43:15 dkf Exp $ -'\"  -.so man.macros  .TH while n "" Tcl "Tcl Built-In Commands" +.so man.macros  .BS  '\" Note:  do not modify the .SH NAME line immediately below!  .SH NAME @@ -16,7 +14,6 @@ while \- Execute script repeatedly as long as a condition is met  .SH SYNOPSIS  \fBwhile \fItest body\fR  .BE -  .SH DESCRIPTION  .PP  The \fBwhile\fR command evaluates \fItest\fR as an expression @@ -43,6 +40,7 @@ expression is evaluated (before  each loop iteration), so changes in the variables will be visible.  For an example, try the following script with and without the braces  around \fB$x<10\fR: +.PP  .CS  set x 0  \fBwhile\fR {$x<10} { @@ -51,17 +49,17 @@ set x 0  }  .CE  .SH EXAMPLE +.PP  Read lines from a channel until we get to the end of the stream, and  print them out with a line-number prepended: +.PP  .CS  set lineCount 0  \fBwhile\fR {[gets $chan line] >= 0} {      puts "[incr lineCount]: $line"  }  .CE -  .SH "SEE ALSO"  break(n), continue(n), for(n), foreach(n) -  .SH KEYWORDS -boolean value, loop, test, while +boolean, loop, test, while | 
