Type:
length: string -> integer
length: list -> list
length: sequence -> sequence
Call syntax:
length(s)
#s
Description:
length returns the length of a serial object
(string, list, or sequence). Length is measured in characters
for strings, in list-elements for lists, and in notes for
sequences. The respective empty series
have length zero; the index positions within serial objects
are counted 1,2,...,length(s).
As a shorthand notation, #s is equivalent to length(s) for arbitrary serial expressions s. The unary length operator # binds stronger then all binary operators (such as *,/,etc.).
For note sequences, length should not be confused
with the functions duration and
Example:
> length([c1/4 f#/8 g/2])
Result= 3
> length("a. salieri")
Result= 10
> length(LIST())
Result= 0
See also: string (object type), list (object type), sequence (object type), duration, time, Operators and Expressions.