The length function

Description

The length function returns the number of characters in a string or character, or the number of values in a list. The type of the value returned by this function is always integer.

Parameter

The length function's only parameter is an expression of one of the following types:

Example

    length('')        returns   0
    length('a')       returns  1
    length('hello')   returns  5

And if l is a list of integer then

    new(l);
    length(l);         returns  0

and

    new(l);
    insert(1, l);
    insert(78, l);
    insert(45, l);
    insert(3, l);
    length(l);         returns  4

Portability

Operating Systems: All
Standard Pascal: No