Array.Rank

Syntax

Rank: Integer;

Description

The Rank property returns the number of array dimensions.

Example

Sub UserProc;
Var
    Ar: Array[1015];
    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 UserProc;

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

See also:

Array