1<HTML><HEAD><TITLE>Built-In Commands - list manual page</TITLE></HEAD><BODY>
2<H3><A NAME="M2">NAME</A></H3>
3list - Create a list
4<H3><A NAME="M3">SYNOPSIS</A></H3>
5<B>list </B>?<I>arg arg ...</I>?<BR>
6<H3><A NAME="M4">DESCRIPTION</A></H3>
7This command returns a list comprised of all the <I>arg</I>s,
8or an empty string if no <I>arg</I>s are specified.
9Braces and backslashes get added as necessary, so that the <B><A HREF="../TclCmd/lindex.htm">lindex</A></B> command
10may be used on the result to re-extract the original arguments, and also
11so that <B><A HREF="../TclCmd/eval.htm">eval</A></B> may be used to execute the resulting list, with
12<I>arg1</I> comprising the command's name and the other <I>arg</I>s comprising
13its arguments.  <B>List</B> produces slightly different results than
14<B><A HREF="../TclCmd/concat.htm">concat</A></B>:  <B><A HREF="../TclCmd/concat.htm">concat</A></B> removes one level of grouping before forming
15the list, while <B>list</B> works directly from the original arguments.
16<H3><A NAME="M5">EXAMPLE</A></H3>
17The command
18<PRE><B>list</B> a b &quot;c d e  &quot; &quot;  f {g h}&quot;</PRE>
19will return
20<PRE><B>a b {c d e  } {  f {g h}}</B></PRE>
21while <B><A HREF="../TclCmd/concat.htm">concat</A></B> with the same arguments will return
22<PRE><B>a b c d e f {g h}</B></PRE>
23<H3><A NAME="M6">SEE ALSO</A></H3>
24<B><A HREF="../TclCmd/lappend.htm">lappend</A></B>, <B><A HREF="../TclCmd/lindex.htm">lindex</A></B>, <B><A HREF="../TclCmd/linsert.htm">linsert</A></B>, <B><A HREF="../TclCmd/llength.htm">llength</A></B>, <B><A HREF="../TclCmd/lrange.htm">lrange</A></B>, <B><A HREF="../TclCmd/lreplace.htm">lreplace</A></B>, <B><A HREF="../TclCmd/lsearch.htm">lsearch</A></B>, <B><A HREF="../TclCmd/lset.htm">lset</A></B>, <B><A HREF="../TclCmd/lsort.htm">lsort</A></B>
25<H3><A NAME="M7">KEYWORDS</A></H3>
26<A href="../Keywords/E.htm#element">element</A>, <A href="../Keywords/L.htm#list">list</A>
27<HR><PRE>
28<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
29<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
30<A HREF="../copyright.htm">Copyright</A> &#169; 2001 Kevin B. Kenny. All rights reserved.
31<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
32</BODY></HTML>
33