Array.GetUpperBound

Syntax

GetUpperBound(Dimension: Integer): Integer;

Parameters

Dimension. Number of the dimension, the upper limit of which must be obtained. Dimensions numbering starts with one.

Description

The GetUpperBound method returns the upper limit of the dimension, the number of which is passed as the Dimension input parameter.

Example

Sub UserProc;
Var
    Ar: Array[-5..1015];
    Upper, i, j: Integer;
Begin
    For i := -5 To 10 Do
        For j := 0 To 14 Do
            Ar[i, j] := i * j;
        End For;
    End For;
    Upper := Ar.GetUpperBound(1);
End Sub UserProc;

After executing the example data is written to the Ar two-dimensional array, and the Upper variable contains the upper limit of the first dimension, in this case, 10.

See also:

Array