diff options
Diffstat (limited to 'doc/foreach.n')
-rw-r--r-- | doc/foreach.n | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/doc/foreach.n b/doc/foreach.n index 925ec1f..1a3b2b6 100644 --- a/doc/foreach.n +++ b/doc/foreach.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH foreach n "" Tcl "Tcl Built-In Commands" .so man.macros .BS @@ -49,10 +49,8 @@ The \fBbreak\fR and \fBcontinue\fR statements may be invoked inside \fIbody\fR, with the same effect as in the \fBfor\fR command. \fBForeach\fR returns an empty string. .SH EXAMPLES -.PP This loop prints every value in a list together with the square and cube of the value: -.PP .CS '\" Maintainers: notice the tab hacking below! .ta 3i @@ -65,7 +63,6 @@ puts "Value\etSquare\etCube" ;# Neat-looking header .PP The following loop uses i and j as loop variables to iterate over pairs of elements of a single list. -.PP .CS set x {} \fBforeach\fR {i j} {a b c d e f} { @@ -76,7 +73,6 @@ set x {} .CE .PP The next loop uses i and j to iterate over two lists in parallel. -.PP .CS set x {} \fBforeach\fR i {a b c} j {d e f g} { @@ -87,7 +83,6 @@ set x {} .CE .PP The two forms are combined in the following example. -.PP .CS set x {} \fBforeach\fR i {a b c} {j k} {d e f g} { @@ -101,4 +96,4 @@ set x {} for(n), while(n), break(n), continue(n) .SH KEYWORDS -foreach, iteration, list, loop +foreach, iteration, list, looping |