summaryrefslogtreecommitdiffstats
path: root/doc/lset.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-25 09:25:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-25 09:25:27 (GMT)
commit859f56b5099b2bfd3ad42becd2aaddca16196ce2 (patch)
treea55358a428b5851b24d6a6406ae63dc80f3b016d /doc/lset.n
parent79cc10a2e22854d53a72f18f95e87a867df9925a (diff)
downloadtcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.zip
tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.gz
tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.bz2
GOOBE for command results in examples
Diffstat (limited to 'doc/lset.n')
-rwxr-xr-xdoc/lset.n32
1 files changed, 18 insertions, 14 deletions
diff --git a/doc/lset.n b/doc/lset.n
index 00f758d..7b7889f 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.10 2007/10/24 14:29:38 dkf Exp $
+'\" RCS: @(#) $Id: lset.n,v 1.11 2007/10/25 09:25:27 dkf Exp $
'\"
.so man.macros
.TH lset n 8.4 Tcl "Tcl Built-In Commands"
@@ -79,33 +79,37 @@ 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\fR is:
.CS
+.ta 2i
set x [list [list a b c] [list d e f] [list g h i]]
- => {a b c} {d e f} {g h i}
+ \fB\(->\fR {a b c} {d e f} {g h i}
.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
+.ta 2i
+lset x {j k l} \fB\(->\fR j k l
+lset x {} {j k l} \fB\(->\fR j k l
+lset x 0 j \fB\(->\fR j {d e f} {g h i}
+lset x 2 j \fB\(->\fR {a b c} {d e f} j
+lset x end j \fB\(->\fR {a b c} {d e f} j
+lset x end-1 j \fB\(->\fR {a b c} j {g h i}
+lset x 2 1 j \fB\(->\fR {a b c} {d e f} {g j i}
+lset x {2 1} j \fB\(->\fR {a b c} {d e f} {g j i}
+lset x {2 3} j \fB\(->\fR \fIlist index out of range\fR
.CE
In the following examples, the initial value of \fIx\fR is:
.CS
+.ta 2i
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}}
+ \fB\(->\fR {{a b} {c d}} {{e f} {g h}}
.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}}
+.ta 2i
+lset x 1 1 0 j \fB\(->\fR {{a b} {c d}} {{e f} {j h}}
+lset x {1 1 0} j \fB\(->\fR {{a b} {c d}} {{e f} {j h}}
.CE
.SH "SEE ALSO"
list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n),