1llength(n)                   Tcl Built-In Commands                  llength(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       llength - Count the number of elements in a list
9

SYNOPSIS

11       llength list
12_________________________________________________________________
13
14

DESCRIPTION

16       Treats list as a list and returns a decimal string giving the number of
17       elements in it.
18
19

EXAMPLES

21       The result is the number of elements:
22              % llength {a b c d e}
23              5
24              % llength {a b c}
25              3
26              % llength {}
27              0
28
29       Elements are not guaranteed to be exactly words in a  dictionary  sense
30       of course, especially when quoting is used:
31              % llength {a b {c d} e}
32              4
33              % llength {a b { } c d e}
34              6
35
36       An empty list is not necessarily an empty string:
37              % set var { }; puts "[string length $var],[llength $var]"
38              1,0
39
40

SEE ALSO

42       list(n),   lappend(n),   lindex(n),  linsert(n),  lsearch(n),  lset(n),
43       lsort(n), lrange(n), lreplace(n)
44
45

KEYWORDS

47       element, list, length
48
49
50
51Tcl                                                                 llength(n)
Impressum