OSDN Git Service

92a25cc640e1df373703a78391d894d6f07f1633
[pf3gnuchains/sourceware.git] / tcl / doc / list.n
1 '\"
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$
9 '\" 
10 .so man.macros
11 .TH list n "" Tcl "Tcl Built-In Commands"
12 .BS
13 '\" Note:  do not modify the .SH NAME line immediately below!
14 .SH NAME
15 list \- Create a list
16 .SH SYNOPSIS
17 \fBlist \fR?\fIarg arg ...\fR?
18 .BE
19
20 .SH DESCRIPTION
21 .PP
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
32 .CS
33 \fBlist a b {c d e} {f {g h}}\fR
34 .CE
35 will return
36 .CS
37 \fBa b {c d e} {f {g h}}\fR
38 .CE
39 while \fBconcat\fR with the same arguments will return
40 .CS
41 \fBa b c d e f {g h}\fR
42 .CE
43
44 .SH KEYWORDS
45 element, list