summaryrefslogtreecommitdiffstats
path: root/doc/lset.n
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2002-09-24 08:55:38 (GMT)
committerdkf <dkf@noemail.net>2002-09-24 08:55:38 (GMT)
commit4c19c88b0f0745c9959fd1310fd9d002a5134f04 (patch)
treea0f2c021b4d9a691da24b39a6183cd5411901da3 /doc/lset.n
parent977aa9d984cd03ab9760ee719a86c9d4cbdb72d7 (diff)
downloadtcl-4c19c88b0f0745c9959fd1310fd9d002a5134f04.zip
tcl-4c19c88b0f0745c9959fd1310fd9d002a5134f04.tar.gz
tcl-4c19c88b0f0745c9959fd1310fd9d002a5134f04.tar.bz2
* doc/lset.n: Changed 'list' to 'varName' for consistency with
lappend documentation. Thanks to Glenn Jackman [Bug 611719] FossilOrigin-Name: 398ddbad7169227289a95831e25c2db0514616d2
Diffstat (limited to 'doc/lset.n')
-rwxr-xr-xdoc/lset.n21
1 files changed, 11 insertions, 10 deletions
diff --git a/doc/lset.n b/doc/lset.n
index 16ed782..fb61014 100755
--- a/doc/lset.n
+++ b/doc/lset.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: lset.n,v 1.4 2002/07/23 18:17:12 jenglish Exp $
+'\" RCS: @(#) $Id: lset.n,v 1.5 2002/09/24 08:55:40 dkf Exp $
'\"
.so man.macros
.TH lset n 8.4 Tcl "Tcl Built-In Commands"
@@ -13,30 +13,31 @@
.SH NAME
lset \- Change an element in a list
.SH SYNOPSIS
-\fBlset \fIlist ?index...? newValue\fR
+\fBlset \fIvarName ?index...? newValue\fR
.BE
.SH DESCRIPTION
.PP
-The \fBlset\fP command accepts a parameter, \fIlist\fP, which
+The \fBlset\fP command accepts a parameter, \fIvarName\fP, which
it interprets as the name of a variable containing a Tcl list.
It also accepts zero or more \fIindices\fP into
the list. The indices may be presented either consecutively on the
command line, or grouped in a
Tcl list and presented as a single argument.
-Finally, it accepts a new value for an element of \fIlist\fP.
+Finally, it accepts a new value for an element of \fIvarName\fP.
.PP
If no indices are presented, the command takes the form:
.CS
-lset list newValue
+lset varName newValue
.CE
or
.CS
-lset list {} newValue
+lset varName {} newValue
.CE
-In this case, \fInewValue\fP replaces the old value of the variable \fIlist\fP.
+In this case, \fInewValue\fP replaces the old value of the variable
+\fIvarName\fP.
.PP
When presented with a single index, the \fBlset\fR command
-treats the content of the \fIlist\fR variable as a Tcl list.
+treats the content of the \fIvarBane\fR variable as a Tcl list.
It addresses the \fIindex\fR'th element in it
(0 refers to the first element of the list).
When interpreting the list, \fBlset\fR observes the same rules
@@ -45,11 +46,11 @@ interpreter; however, variable
substitution and command substitution do not occur.
The command constructs a new list in which the designated element is
replaced with \fInewValue\fP. This new list is stored in the
-variable \fIlist\fP, and is also the return value from the \fBlset\fP
+variable \fIvarName\fP, and is also the return value from the \fBlset\fP
command.
.PP
If \fIindex\fR is negative or greater than or equal to the number
-of elements in \fI$list\fR, then an error occurs.
+of elements in \fI$varName\fR, then an error occurs.
.PP
If \fIindex\fR has the value \fBend\fR, it refers to the last element
in the list, and \fBend\-\fIinteger\fR refers to the last element in