Array.Rank

Syntax

Rank: Integer;

Description

The Rank property returns the number of array dimensions.

Example

Sub Main;

Var

Ar: Array[10, 15];

Rank, 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;

Rank := Ar.Rank;

End Sub Main;

After executing the example data is written to the Ar two-dimensional array, and the Rank variable will contain the number of array dimensions, in this case, 2.

See also:

Array