Array.Length

Syntax

Length: Integer;

Description

The Length property returns the number of all array elements. The result is a product of the number of elements of each dimension.

Example

Sub Main;

Var

Ar: Array[10, 15];

Len, i, j: Integer;

Begin

For i := 0 To 9 Do

For j := 0 To 14 Do

Ar[i, j] := i * j;

End For;

End For;

Len := Ar.Length;

End Sub Main;

After executing the example data is written to the Ar two-dimensional array, and the Len variable will contain the number of array elements.

See also:

Array