diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-08-11 13:26:10 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-08-11 13:26:10 (GMT) |
commit | 65e17722f171ca567827a4d59ea436f636f938d2 (patch) | |
tree | 451d47fff87eb5ac1a61afbfd2d8d408f50ac26e /doc | |
parent | 632196139ecb87e0d5c65db14c7d1565a91a54a7 (diff) | |
download | tcl-65e17722f171ca567827a4d59ea436f636f938d2.zip tcl-65e17722f171ca567827a4d59ea436f636f938d2.tar.gz tcl-65e17722f171ca567827a4d59ea436f636f938d2.tar.bz2 |
TIP#136 IMPLEMENTATION. We now have an [lrepeat] command!
Diffstat (limited to 'doc')
-rw-r--r-- | doc/list.n | 11 | ||||
-rw-r--r-- | doc/lrepeat.n | 37 |
2 files changed, 42 insertions, 6 deletions
@@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: list.n,v 1.7 2001/12/05 22:26:43 dgp Exp $ +'\" RCS: @(#) $Id: list.n,v 1.8 2003/08/11 13:26:13 dkf Exp $ '\" .so man.macros .TH list n "" Tcl "Tcl Built-In Commands" @@ -43,12 +43,11 @@ while \fBconcat\fR with the same arguments will return .CE .SH "SEE ALSO" -lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), -.VS 8.4 -lset(n), +lappend(n), lindex(n), linsert(n), llength(n), +.VS 8.5 +lrepeat(n), .VE -lsort(n), -lrange(n), lreplace(n) +lrange(n), lreplace(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS element, list diff --git a/doc/lrepeat.n b/doc/lrepeat.n new file mode 100644 index 0000000..d5c6d9a --- /dev/null +++ b/doc/lrepeat.n @@ -0,0 +1,37 @@ +'\" +'\" Copyright (c) 2003 by Simon Geard. All rights reserved. +'\" +'\" 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.1 2003/08/11 13:26:13 dkf Exp $ +'\" +.so man.macros +.TH lrepeat n 8.5 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +lrepeat \- Build a list by repeating elements +.SH SYNOPSIS +\fBlrepeat \fInumber element1 \fR?\fIelement2 element3 ...\fR? +.BE +.SH DESCRIPTION +.PP +The \fBlrepeat\fP command creates a list of size \fInumber * number of +elements\fP by repeating \fInumber\fR times the sequence of elements +\fIelement1 element2 ...\fR. \fInumber\fP must be a positive integer, +\fIelementn\fP 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 +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) + +.SH KEYWORDS +element, index, list |