summaryrefslogtreecommitdiffstats
path: root/doc/lrepeat.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-25 09:25:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-25 09:25:27 (GMT)
commit859f56b5099b2bfd3ad42becd2aaddca16196ce2 (patch)
treea55358a428b5851b24d6a6406ae63dc80f3b016d /doc/lrepeat.n
parent79cc10a2e22854d53a72f18f95e87a867df9925a (diff)
downloadtcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.zip
tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.gz
tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.bz2
GOOBE for command results in examples
Diffstat (limited to 'doc/lrepeat.n')
-rw-r--r--doc/lrepeat.n27
1 files changed, 16 insertions, 11 deletions
diff --git a/doc/lrepeat.n b/doc/lrepeat.n
index 4bda99c..4b1ebce 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.2 2006/11/15 09:23:01 dkf Exp $
+'\" RCS: @(#) $Id: lrepeat.n,v 1.3 2007/10/25 09:25:27 dkf Exp $
'\"
.so man.macros
.TH lrepeat n 8.5 Tcl "Tcl Built-In Commands"
@@ -17,18 +17,23 @@ lrepeat \- Build a list by repeating elements
.BE
.SH DESCRIPTION
.PP
-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.
+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.
.SH EXAMPLES
.CS
-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
+.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
.CE
.SH "SEE ALSO"
list(n), lappend(n), linsert(n), llength(n), lset(n)