Array.Sort

Syntax

Sort;

Description

The Sort method sorts array elements in the ascending order.

Comments

This method is supported for one-dimensional arrays only.

Example

Add a link to the MathFin system assembly.

Sub UserProc;
Var
    Ar: Array[0..20Of Integer;
    i: Integer;
Begin
    For i := 0 To 20 Do
        Ar[i] := Math.RandBetweenI(0100);
    End For;
    Ar.Sort;
End Sub UserProc;

After executing the example random integers are written to the Ar one-dimensional array, after which all array values are sorted.

See also:

Array