Sort;
The Sort method sorts array elements in the ascending order.
NOTE. This method is supported for one-dimensional arrays only.
Sub Main;
Var
Ar: Array[0..20] Of Integer;
i: Integer;
Begin
For i := 0 To 20 Do
Ar[i] := Math.RandBetweenI(0, 100);
End For;
Ar.Sort;
End Sub Main;
After executing the example random integers are written to the Ar one-dimensional array, after which all array values are sorted.
See also: