"Fossies" - the Fresh Open Source Software Archive

Member "SAOImageDS9/tcl8.6/doc/llength.n" (13 Nov 2019, 1305 Bytes) of package /linux/misc/ds9.8.1.tar.gz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

llength

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
SEE ALSO
KEYWORDS

NAME

llength − Count the number of elements in a list

SYNOPSIS

llength list

DESCRIPTION

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

EXAMPLES

The result is the number of elements:

% llength {a b c d e} 5 % llength {a b c} 3 % llength {} 0

Elements are not guaranteed to be exactly words in a dictionary sense of course, especially when quoting is used:

% llength {a b {c d} e} 4 % llength {a b { } c d e} 6

An empty list is not necessarily an empty string:

% set var { }; puts "[string length $var],[llength $var]" 1,0

SEE ALSO

list(n), lappend(n), lindex(n), linsert(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n)

KEYWORDS

element, list, length