DoubleComparer: IComparer;
The DoubleComparer property returns an object to compare elements of real type.
Sub UserProc;
Var
ArrayL: IArrayList;
i: Integer;
Begin
ArrayL := New ArrayList.Create;
For i := 0 To Math.RandBetweenI(50, 100) Do
ArrayL.Add(Math.RandBetween(0, 100));
End For;
ArrayL.Sort(Comparer.DoubleComparer);
End Sub UserProc;
After executing the example a dynamic array of random real numbers is generated, the array is sorted in ascending order.
See also: