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
14
16 This command returns a list comprised of all the args, or an empty
17 string if no args are specified. Braces and backslashes get added as
18 necessary, so that the lindex command may be used on the result to re-
19 extract the original arguments, and also so that eval may be used to
20 execute the resulting list, with arg1 comprising the command's name and
21 the other args comprising its arguments. List produces slightly dif‐
22 ferent results than concat: concat removes one level of grouping
23 before forming the list, while list works directly from the original
24 arguments.
25
27 The command
28 list a b "c d e " " f {g h}"
29 will return
30 a b {c d e } { f {g h}}
31 while concat with the same arguments will return
32 a b c d e f {g h}
33
34
36 lappend(n), lindex(n), linsert(n), llength(n), lrange(n), lrepeat(n), │
37 lreplace(n), lsearch(n), lset(n), lsort(n)
38
39
41 element, list
42
43
44
45Tcl list(n)