summaryrefslogtreecommitdiffstats
path: root/doc/lreplace.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lreplace.n')
-rw-r--r--doc/lreplace.n12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/lreplace.n b/doc/lreplace.n
index 652a9a9..1a43cba 100644
--- a/doc/lreplace.n
+++ b/doc/lreplace.n
@@ -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: lreplace.n,v 1.14 2007/10/24 14:29:38 dkf Exp $
+'\" RCS: @(#) $Id: lreplace.n,v 1.15 2007/10/26 20:11:53 dgp Exp $
'\"
.so man.macros
.TH lreplace n 7.4 Tcl "Tcl Built-In Commands"
@@ -17,6 +17,7 @@ lreplace \- Replace elements in a list with new elements
.SH SYNOPSIS
\fBlreplace \fIlist first last \fR?\fIelement element ...\fR?
.BE
+
.SH DESCRIPTION
.PP
\fBlreplace\fR returns a new list formed by replacing one or more elements of
@@ -32,16 +33,16 @@ end of the list.
list, and \fBend\fR refers to the last element of the list.
If \fIlist\fR is empty, then \fIfirst\fR and \fIlast\fR are ignored.
.VE
-.PP
+
If \fIfirst\fR is less than zero, it is considered to refer to the
first element of the list. For non-empty lists, the element indicated
by \fIfirst\fR must exist.
-.PP
+
If \fIlast\fR is less than zero but greater than \fIfirst\fR, then any
specified elements will be prepended to the list. If \fIlast\fR is
less than \fIfirst\fR then no elements are deleted; the new elements
are simply inserted before \fIfirst\fR.
-.PP
+
The \fIelement\fR arguments specify zero or more new arguments to
be added to the list in place of those that were deleted.
Each \fIelement\fR argument will become a separate element of
@@ -68,11 +69,14 @@ a b c d e
% set var [\fBlreplace\fR $var end end]
a b c d
.CE
+
.SH "SEE ALSO"
list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n),
lset(n), lrange(n), lsort(n),
.VS 8.5
string(n)
.VE
+
+
.SH KEYWORDS
element, list, replace