| 1 |
'\" |
| 2 |
'\" Copyright (c) 1993 The Regents of the University of California. |
| 3 |
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc. |
| 4 |
'\" Copyright (c) 2001 Kevin B. Kenny <[email protected]>. All rights reserved. |
| 5 |
'\" |
| 6 |
'\" See the file "license.terms" for information on usage and redistribution |
| 7 |
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 8 |
'\" |
| 9 |
.TH list n "" Tcl "Tcl Built-In Commands" |
| 10 |
.so man.macros |
| 11 |
.BS |
| 12 |
'\" Note: do not modify the .SH NAME line immediately below! |
| 13 |
.SH NAME |
| 14 |
list \- Create a list |
| 15 |
.SH SYNOPSIS |
| 16 |
\fBlist \fR?\fIarg arg ...\fR? |
| 17 |
.BE |
| 18 |
.SH DESCRIPTION |
| 19 |
.PP |
| 20 |
This command returns a list comprised of all the \fIarg\fRs, |
| 21 |
or an empty string if no \fIarg\fRs are specified. |
| 22 |
Braces and backslashes get added as necessary, so that the \fBlindex\fR command |
| 23 |
may be used on the result to re-extract the original arguments, and also |
| 24 |
so that \fBeval\fR may be used to execute the resulting list, with |
| 25 |
\fIarg1\fR comprising the command's name and the other \fIarg\fRs comprising |
| 26 |
its arguments. \fBList\fR produces slightly different results than |
| 27 |
\fBconcat\fR: \fBconcat\fR removes one level of grouping before forming |
| 28 |
the list, while \fBlist\fR works directly from the original arguments. |
| 29 |
.SH EXAMPLE |
| 30 |
.PP |
| 31 |
The command |
| 32 |
.PP |
| 33 |
.CS |
| 34 |
\fBlist\fR a b "c d e " " f {g h}" |
| 35 |
.CE |
| 36 |
.PP |
| 37 |
will return |
| 38 |
.PP |
| 39 |
.CS |
| 40 |
\fBa b {c d e } { f {g h}}\fR |
| 41 |
.CE |
| 42 |
.PP |
| 43 |
while \fBconcat\fR with the same arguments will return |
| 44 |
.PP |
| 45 |
.CS |
| 46 |
\fBa b c d e f {g h}\fR |
| 47 |
.CE |
| 48 |
.SH "SEE ALSO" |
| 49 |
lappend(n), lindex(n), linsert(n), llength(n), lrange(n), |
| 50 |
lrepeat(n), |
| 51 |
lreplace(n), lsearch(n), lset(n), lsort(n) |
| 52 |
.SH KEYWORDS |
| 53 |
element, list, quoting |
| 54 |
'\"Local Variables: |
| 55 |
'\"mode: nroff |
| 56 |
'\"End: |