2 '\" Copyright (c) 1993 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 .TH list n "" Tcl "Tcl Built-In Commands"
13 '\" Note: do not modify the .SH NAME line immediately below!
17 \fBlist \fR?\fIarg arg ...\fR?
22 This command returns a list comprised of all the \fIarg\fRs,
23 or an empty string if no \fIarg\fRs are specified.
24 Braces and backslashes get added as necessary, so that the \fBindex\fR command
25 may be used on the result to re-extract the original arguments, and also
26 so that \fBeval\fR may be used to execute the resulting list, with
27 \fIarg1\fR comprising the command's name and the other \fIarg\fRs comprising
28 its arguments. \fBList\fR produces slightly different results than
29 \fBconcat\fR: \fBconcat\fR removes one level of grouping before forming
30 the list, while \fBlist\fR works directly from the original arguments.
31 For example, the command
33 \fBlist a b {c d e} {f {g h}}\fR
37 \fBa b {c d e} {f {g h}}\fR
39 while \fBconcat\fR with the same arguments will return
41 \fBa b c d e f {g h}\fR