summaryrefslogtreecommitdiffstats
path: root/doc/while.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
commit842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch)
tree5a94240e321022019f593f6bd712833ab12138c6 /doc/while.n
parent8b464633a0f2df93912ad25af65a5724cd643da2 (diff)
downloadtcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2
Improve clarity of formatting.
Diffstat (limited to 'doc/while.n')
-rw-r--r--doc/while.n8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/while.n b/doc/while.n
index bd74f45..cc4921c 100644
--- a/doc/while.n
+++ b/doc/while.n
@@ -5,7 +5,7 @@
'\" 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.5 2004/10/27 14:43:54 dkf Exp $
+'\" RCS: @(#) $Id: while.n,v 1.6 2008/10/17 10:22:25 dkf Exp $
'\"
.so man.macros
.TH while n "" Tcl "Tcl Built-In Commands"
@@ -16,7 +16,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 +42,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 +51,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