diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-01 23:36:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-01 23:36:46 (GMT) |
commit | c7d4f0143c9004a2ad087ba1faf97eaec526c3e2 (patch) | |
tree | b14613647bccdf8360da6c3a755b0ab6d29b5279 /doc/lset.n | |
parent | 8700b04b46fb89254c0ce1489142dd0a7bf68702 (diff) | |
download | tcl-c7d4f0143c9004a2ad087ba1faf97eaec526c3e2.zip tcl-c7d4f0143c9004a2ad087ba1faf97eaec526c3e2.tar.gz tcl-c7d4f0143c9004a2ad087ba1faf97eaec526c3e2.tar.bz2 |
Minor documentation improvements
Diffstat (limited to 'doc/lset.n')
-rwxr-xr-x | doc/lset.n | 41 |
1 files changed, 25 insertions, 16 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.12 2007/10/26 20:11:53 dgp Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.13 2007/11/01 23:36:46 dkf Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -80,32 +80,43 @@ of a list. If an index is outside the permitted range, an error is reported. In each of these examples, the initial value of \fIx\fR is: .CS set x [list [list a b c] [list d e f] [list g h i]] - => {a b c} {d e f} {g h i} + \fI\(-> {a b c} {d e f} {g h i}\fR .CE The indicated return value also becomes the new value of \fIx\fR (except in the last case, which is an error which leaves the value of \fIx\fR unchanged.) .CS -lset x {j k l} => j k l -lset x {} {j k l} => j k l -lset x 0 j => j {d e f} {g h i} -lset x 2 j => {a b c} {d e f} j -lset x end j => {a b c} {d e f} j -lset x end-1 j => {a b c} j {g h i} -lset x 2 1 j => {a b c} {d e f} {g j i} -lset x {2 1} j => {a b c} {d e f} {g j i} -lset x {2 3} j => \fIlist index out of range\fR +\fBlset\fR x {j k l} + \fI\(-> j k l\fR +\fBlset\fR x {} {j k l} + \fI\(-> j k l\fR +\fBlset\fR x 0 j + \fI\(-> j {d e f} {g h i}\fR +\fBlset\fR x 2 j + \fI\(-> {a b c} {d e f} j\fR +\fBlset\fR x end j + \fI\(-> {a b c} {d e f} j\fR +\fBlset\fR x end-1 j + \fI\(-> {a b c} j {g h i}\fR +\fBlset\fR x 2 1 j + \fI\(-> {a b c} {d e f} {g j i}\fR +\fBlset\fR x {2 1} j + \fI\(-> {a b c} {d e f} {g j i}\fR +\fBlset\fR x {2 3} j + \fI\(-> list index out of range\fR .CE In the following examples, the initial value of \fIx\fR is: .CS 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}} + \fI\(-> {{a b} {c d}} {{e f} {g h}}\fR .CE The indicated return value also becomes the new value of \fIx\fR. .CS -lset x 1 1 0 j => {{a b} {c d}} {{e f} {j h}} -lset x {1 1 0} j => {{a b} {c d}} {{e f} {j h}} +\fBlset\fR x 1 1 0 j + \fI\(-> {{a b} {c d}} {{e f} {j h}}\fR +\fBlset\fR x {1 1 0} j + \fI\(-> {{a b} {c d}} {{e f} {j h}}\fR .CE .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), @@ -113,7 +124,5 @@ lsort(n), lrange(n), lreplace(n), .VS 8.5 string(n) .VE - - .SH KEYWORDS element, index, list, replace, set |