diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-10-25 09:25:27 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-10-25 09:25:27 (GMT) |
commit | 859f56b5099b2bfd3ad42becd2aaddca16196ce2 (patch) | |
tree | a55358a428b5851b24d6a6406ae63dc80f3b016d /doc/lindex.n | |
parent | 79cc10a2e22854d53a72f18f95e87a867df9925a (diff) | |
download | tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.zip tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.gz tcl-859f56b5099b2bfd3ad42becd2aaddca16196ce2.tar.bz2 |
GOOBE for command results in examples
Diffstat (limited to 'doc/lindex.n')
-rw-r--r-- | doc/lindex.n | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/lindex.n b/doc/lindex.n index b99427e..f8f1e40 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.12 2006/11/15 09:23:01 dkf Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.13 2007/10/25 09:25:27 dkf Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -67,17 +67,20 @@ is synonymous with lindex [lindex [lindex $a 1] 2] 3 .CE .SH EXAMPLES +.PP +Demonstrating how the index list system works. .CS -\fBlindex\fR {a b c} \fI=> a b c\fR -\fBlindex\fR {a b c} {} \fI=> a b c\fR -\fBlindex\fR {a b c} 0 \fI=> a\fR -\fBlindex\fR {a b c} 2 \fI=> c\fR -\fBlindex\fR {a b c} end \fI=> c\fR -\fBlindex\fR {a b c} end-1 \fI=> b\fR -\fBlindex\fR {{a b c} {d e f} {g h i}} 2 1 \fI=> h\fR -\fBlindex\fR {{a b c} {d e f} {g h i}} {2 1} \fI=> h\fR -\fBlindex\fR {{{a b} {c d}} {{e f} {g h}}} 1 1 0 \fI=> g\fR -\fBlindex\fR {{{a b} {c d}} {{e f} {g h}}} {1 1 0} \fI=> g\fR +.ta 5i +\fBlindex\fR {a b c} \fB\(->\fI a b c\fR +\fBlindex\fR {a b c} {} \fB\(->\fI a b c\fR +\fBlindex\fR {a b c} 0 \fB\(->\fI a\fR +\fBlindex\fR {a b c} 2 \fB\(->\fI c\fR +\fBlindex\fR {a b c} end \fB\(->\fI c\fR +\fBlindex\fR {a b c} end-1 \fB\(->\fI b\fR +\fBlindex\fR {{a b c} {d e f} {g h i}} 2 1 \fB\(->\fI h\fR +\fBlindex\fR {{a b c} {d e f} {g h i}} {2 1} \fB\(->\fI h\fR +\fBlindex\fR {{{a b} {c d}} {{e f} {g h}}} 1 1 0 \fB\(->\fI g\fR +\fBlindex\fR {{{a b} {c d}} {{e f} {g h}}} {1 1 0} \fB\(->\fI g\fR .CE .SH "SEE ALSO" list(n), lappend(n), linsert(n), llength(n), lsearch(n), @@ -85,6 +88,5 @@ lset(n), lsort(n), lrange(n), lreplace(n), .VS 8.5 string(n) .VE - .SH KEYWORDS element, index, list |