1list(n) Tcl Built-In Commands list(n)
2
3
4
5______________________________________________________________________________
6
8 list - Create a list
9
11 list ?arg arg ...?
12______________________________________________________________________________
13
15 This command returns a list comprised of all the args, or an empty
16 string if no args are specified. Braces and backslashes get added as
17 necessary, so that the lindex command may be used on the result to re-
18 extract the original arguments, and also so that eval may be used to
19 execute the resulting list, with arg1 comprising the command's name and
20 the other args comprising its arguments. List produces slightly dif‐
21 ferent results than concat: concat removes one level of grouping
22 before forming the list, while list works directly from the original
23 arguments.
24
26 The command
27
28 list a b "c d e " " f {g h}"
29
30 will return
31
32 a b {c d e } { f {g h}}
33
34 while concat with the same arguments will return
35
36 a b c d e f {g h}
37
39 lappend(n), lindex(n), linsert(n), llength(n), lrange(n), lrepeat(n),
40 lreplace(n), lsearch(n), lset(n), lsort(n)
41
43 element, list, quoting
44
45
46
47Tcl list(n)