summaryrefslogtreecommitdiffstats
path: root/doc/lindex.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
commit842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch)
tree5a94240e321022019f593f6bd712833ab12138c6 /doc/lindex.n
parent8b464633a0f2df93912ad25af65a5724cd643da2 (diff)
downloadtcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2
Improve clarity of formatting.
Diffstat (limited to 'doc/lindex.n')
-rw-r--r--doc/lindex.n14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/lindex.n b/doc/lindex.n
index 3214cc7..4eac53a 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.20 2008/07/13 23:15:23 nijtmans Exp $
+'\" RCS: @(#) $Id: lindex.n,v 1.21 2008/10/17 10:22:25 dkf Exp $
'\"
.so man.macros
.TH lindex n 8.4 Tcl "Tcl Built-In Commands"
@@ -26,13 +26,17 @@ command line, or grouped in a
Tcl list and presented as a single argument.
.PP
If no indices are presented, the command takes the form:
+.PP
.CS
lindex list
.CE
+.PP
or
+.PP
.CS
lindex list {}
.CE
+.PP
In this case, the return value of \fBlindex\fR is simply the value of the
\fIlist\fR parameter.
.PP
@@ -53,14 +57,19 @@ arithmetic and indices relative to the end of the list.
If additional \fIindex\fR arguments are supplied, then each argument is
used in turn to select an element from the previous indexing operation,
allowing the script to select elements from sublists. The command,
+.PP
.CS
lindex $a 1 2 3
.CE
+.PP
or
+.PP
.CS
lindex $a {1 2 3}
.CE
+.PP
is synonymous with
+.PP
.CS
lindex [lindex [lindex $a 1] 2] 3
.CE
@@ -113,3 +122,6 @@ lset(n), lsort(n), lrange(n), lreplace(n),
string(n)
.SH KEYWORDS
element, index, list
+'\"Local Variables:
+'\"mode: nroff
+'\"End: