[25] | 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 <kennykb@acm.org>. 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 | '\" RCS: @(#) $Id: list.n,v 1.11 2008/03/26 09:59:22 dkf Exp $ |
---|
| 10 | '\" |
---|
| 11 | .so man.macros |
---|
| 12 | .TH list n "" Tcl "Tcl Built-In Commands" |
---|
| 13 | .BS |
---|
| 14 | '\" Note: do not modify the .SH NAME line immediately below! |
---|
| 15 | .SH NAME |
---|
| 16 | list \- Create a list |
---|
| 17 | .SH SYNOPSIS |
---|
| 18 | \fBlist \fR?\fIarg arg ...\fR? |
---|
| 19 | .BE |
---|
| 20 | |
---|
| 21 | .SH DESCRIPTION |
---|
| 22 | .PP |
---|
| 23 | This command returns a list comprised of all the \fIarg\fRs, |
---|
| 24 | or an empty string if no \fIarg\fRs are specified. |
---|
| 25 | Braces and backslashes get added as necessary, so that the \fBlindex\fR command |
---|
| 26 | may be used on the result to re-extract the original arguments, and also |
---|
| 27 | so that \fBeval\fR may be used to execute the resulting list, with |
---|
| 28 | \fIarg1\fR comprising the command's name and the other \fIarg\fRs comprising |
---|
| 29 | its arguments. \fBList\fR produces slightly different results than |
---|
| 30 | \fBconcat\fR: \fBconcat\fR removes one level of grouping before forming |
---|
| 31 | the list, while \fBlist\fR works directly from the original arguments. |
---|
| 32 | .SH EXAMPLE |
---|
| 33 | The command |
---|
| 34 | .CS |
---|
| 35 | \fBlist\fR a b "c d e " " f {g h}" |
---|
| 36 | .CE |
---|
| 37 | will return |
---|
| 38 | .CS |
---|
| 39 | \fBa b {c d e } { f {g h}}\fR |
---|
| 40 | .CE |
---|
| 41 | while \fBconcat\fR with the same arguments will return |
---|
| 42 | .CS |
---|
| 43 | \fBa b c d e f {g h}\fR |
---|
| 44 | .CE |
---|
| 45 | |
---|
| 46 | .SH "SEE ALSO" |
---|
| 47 | lappend(n), lindex(n), linsert(n), llength(n), lrange(n), |
---|
| 48 | .VS 8.5 |
---|
| 49 | lrepeat(n), |
---|
| 50 | .VE 8.5 |
---|
| 51 | lreplace(n), lsearch(n), lset(n), lsort(n) |
---|
| 52 | |
---|
| 53 | .SH KEYWORDS |
---|
| 54 | element, list |
---|