[Contents] · [Home] · [Mail]

SALIERI Language - length (#)

length: string -> integer
length: list -> list
length: sequence -> sequence

Call syntax:

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 time, which are used to obtain the relative and absolute durations of a sequence, respectively.

> 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.

[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.