Name:
length
computes the length of a list or string.
Usage:
length
(
L
) :
list
->
integer
length
(
s
) :
string
->
integer
Parameters:
L
is a list.
s
is a string.
Description:
length
returns the length of a list or a string, e.g. the number of elements or letters.
The empty list or string have length 0. If
L
is an end-elliptic list,
length
returns +Inf.
Example 1:
> length("Hello World!");
12
Example 2:
> length([|1,...,5|]);
5
Example 3:
> length([| |]);
0
Example 4:
> length([|1,2...|]);
@Inf@
Go back to the list of commands