diff options
Diffstat (limited to 'doc/lset.n')
-rwxr-xr-x | doc/lset.n | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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.3 2002/07/01 18:24:39 jenglish Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.4 2002/07/23 18:17:12 jenglish Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -76,7 +76,8 @@ of a list. If an index is outside the permitted range, an error is reported. .SH EXAMPLES In each of these examples, the initial value of \fIx\fP is: .CS -{a b c} {d e f} {g h i} +set x [list [list a b c] [list d e f] [list g h i]] + => {a b c} {d e f} {g h i} .CE The indicated return value also becomes the new value of \fIx\fP. .CS @@ -92,7 +93,9 @@ lset x {2 3} j .CE In the following examples, the initial value of \fIx\fP is: .CS -{{a b} {c d}} {{e f} {g h}} +set x [list [list [list a b] [list c d]] \e + [list [list e f] [list g h]]] + => {{a b} {c d}} {{e f} {g h}} .CE The indicated return value also becomes the new value of \fIx\fP. .CS @@ -105,4 +108,3 @@ lsort(n), lrange(n), lreplace(n) .SH KEYWORDS element, index, list, replace, set -.VE |