URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [tcl/] [doc/] [lrange.n] - Blame information for rev 1765
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1993 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
4 |
|
|
'\"
|
5 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
6 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
7 |
|
|
'\"
|
8 |
|
|
'\" RCS: @(#) $Id: lrange.n,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH lrange n 7.4 Tcl "Tcl Built-In Commands"
|
12 |
|
|
.BS
|
13 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
14 |
|
|
.SH NAME
|
15 |
|
|
lrange \- Return one or more adjacent elements from a list
|
16 |
|
|
.SH SYNOPSIS
|
17 |
|
|
\fBlrange \fIlist first last\fR
|
18 |
|
|
.BE
|
19 |
|
|
|
20 |
|
|
.SH DESCRIPTION
|
21 |
|
|
.PP
|
22 |
|
|
\fIList\fR must be a valid Tcl list. This command will
|
23 |
|
|
return a new list consisting of elements
|
24 |
|
|
\fIfirst\fR through \fIlast\fR, inclusive.
|
25 |
|
|
\fIFirst\fR or \fIlast\fR
|
26 |
|
|
may be \fBend\fR (or any abbreviation of it) to refer to the last
|
27 |
|
|
element of the list.
|
28 |
|
|
If \fIfirst\fR is less than zero, it is treated as if it were zero.
|
29 |
|
|
If \fIlast\fR is greater than or equal to the number of elements
|
30 |
|
|
in the list, then it is treated as if it were \fBend\fR.
|
31 |
|
|
If \fIfirst\fR is greater than \fIlast\fR then an empty string
|
32 |
|
|
is returned.
|
33 |
|
|
Note: ``\fBlrange \fIlist first first\fR'' does not always produce the
|
34 |
|
|
same result as ``\fBlindex \fIlist first\fR'' (although it often does
|
35 |
|
|
for simple fields that aren't enclosed in braces); it does, however,
|
36 |
|
|
produce exactly the same results as ``\fBlist [lindex \fIlist first\fB]\fR''
|
37 |
|
|
|
38 |
|
|
.SH KEYWORDS
|
39 |
|
|
element, list, range, sublist
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.