diff options
Diffstat (limited to 'doc/lindex.n')
-rw-r--r-- | doc/lindex.n | 14 |
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: |