diff options
Diffstat (limited to 'doc/lrange.n')
-rw-r--r-- | doc/lrange.n | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/doc/lrange.n b/doc/lrange.n index 86c124e..06ecd56d 100644 --- a/doc/lrange.n +++ b/doc/lrange.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: lrange.n,v 1.8 2004/05/29 18:50:33 jenglish Exp $ +'\" RCS: @(#) $Id: lrange.n,v 1.9 2004/10/27 12:53:22 dkf Exp $ '\" .so man.macros .TH lrange n 7.4 Tcl "Tcl Built-In Commands" @@ -35,26 +35,25 @@ Note: ``\fBlrange \fIlist first first\fR'' does not always produce the same result as ``\fBlindex \fIlist first\fR'' (although it often does for simple fields that aren't enclosed in braces); it does, however, produce exactly the same results as ``\fBlist [lindex \fIlist first\fB]\fR'' - .SH EXAMPLES Selecting the first two elements: .CS -% lrange {a b c d e} 0 1 +% \fBlrange\fR {a b c d e} 0 1 a b .CE - +.PP Selecting the last three elements: .CS -% lrange {a b c d e} end-2 end +% \fBlrange\fR {a b c d e} end-2 end c d e .CE - +.PP Selecting everything except the first and last element: .CS -% lrange {a b c d e} 1 end-1 +% \fBlrange\fR {a b c d e} 1 end-1 b c d .CE - +.PP Selecting a single element with \fBlrange\fR is not the same as doing so with \fBlindex\fR: .CS @@ -62,7 +61,7 @@ so with \fBlindex\fR: some {elements to} select % lindex $var 1 elements to -% lrange $var 1 1 +% \fBlrange\fR $var 1 1 {elements to} .CE |