diff options
Diffstat (limited to 'doc/lrepeat.n')
-rw-r--r-- | doc/lrepeat.n | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/doc/lrepeat.n b/doc/lrepeat.n index 4b1ebce..fdd1388 100644 --- a/doc/lrepeat.n +++ b/doc/lrepeat.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. '\" -'\" RCS: @(#) $Id: lrepeat.n,v 1.3 2007/10/25 09:25:27 dkf Exp $ +'\" RCS: @(#) $Id: lrepeat.n,v 1.4 2007/10/26 20:11:53 dgp Exp $ '\" .so man.macros .TH lrepeat n 8.5 Tcl "Tcl Built-In Commands" @@ -17,23 +17,18 @@ lrepeat \- Build a list by repeating elements .BE .SH DESCRIPTION .PP -The \fBlrepeat\fR command creates a list of size \fInumber\fR \(mu \fInumber -of elements\fR by repeating \fInumber\fR times the sequence of elements -\fIelement1 element2 ...\fR. The \fInumber\fR must be a positive integer, and -each \fIelementN\fR can be any Tcl value. -.PP -Note that -.QW "\fBlrepeat 1 arg ...\fR" -is identical to -.QW "\fBlist arg ...\fR" , -though the \fIarg\fR is required with \fBlrepeat\fR. +The \fBlrepeat\fR command creates a list of size \fInumber * number of +elements\fR by repeating \fInumber\fR times the sequence of elements +\fIelement1 element2 ...\fR. \fInumber\fR must be a positive integer, +\fIelementn\fR can be any Tcl value. Note that \fBlrepeat 1 arg ...\fR +is identical to \fBlist arg ...\fR, though the \fIarg\fR is required +with \fBlrepeat\fR. .SH EXAMPLES .CS -.ta 3i -lrepeat 3 a \fB\(->\fI a a a\fR -lrepeat 3 [lrepeat 3 0] \fB\(->\fI {0 0 0} {0 0 0} {0 0 0}\fR -lrepeat 3 a b c \fB\(->\fI a b c a b c a b c\fR -lrepeat 3 [lrepeat 2 a] b c \fB\(->\fI {a a} b c {a a} b c {a a} b c\fR +lrepeat 3 a => a a a +lrepeat 3 [lrepeat 3 0] => {0 0 0} {0 0 0} {0 0 0} +lrepeat 3 a b c => a b c a b c a b c +lrepeat 3 [lrepeat 2 a] b c => {a a} b c {a a} b c {a a} b c .CE .SH "SEE ALSO" list(n), lappend(n), linsert(n), llength(n), lset(n) |