Attachment "lset.n.diff" to
ticket [611719ffff]
added by
glennjnn
2002-09-20 00:52:53.
*** lset.n.orig Thu Sep 19 13:44:29 2002
--- lset.n Thu Sep 19 13:45:41 2002
***************
*** 13,42 ****
.SH NAME
lset \- Change an element in a list
.SH SYNOPSIS
! \fBlset \fIlist ?index...? newValue\fR
.BE
.SH DESCRIPTION
.PP
! The \fBlset\fP command accepts a parameter, \fIlist\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.
.PP
If no indices are presented, the command takes the form:
.CS
! lset list newValue
.CE
or
.CS
! lset list {} newValue
.CE
! In this case, \fInewValue\fP replaces the old value of the variable \fIlist\fP
.
.PP
When presented with a single index, the \fBlset\fR command
! treats the content of the \fIlist\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
--- 13,42 ----
.SH NAME
lset \- Change an element in a list
.SH SYNOPSIS
! \fBlset \fIvarName ?index...? newValue\fR
.BE
.SH DESCRIPTION
.PP
! 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 \fIvarName\fP.
.PP
If no indices are presented, the command takes the form:
.CS
! lset varName newValue
.CE
or
.CS
! lset varName {} newValue
.CE
! 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 \fIvarName\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,55 ****
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
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.
.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
--- 45,55 ----
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 \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$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