The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SortAndRemoveDuplicates


Unit:SDL_openarrays
Class: none
Declaration: function SortAndRemoveDuplicates (var Data: TIntArray; Ascending: boolean): integer;

The function SortAndRemoveDuplicates sorts the values of the array Data in an order which depends on parameter Ascending. Duplicate values are automatically removed, the size of the Data array is adjusted accordingly.

The function returns the following error codes:

 0 ... everything OK, the returned value is equal to the number of removed duplicates
-1 ... the size of the Data array is less than 2



Last Update: 2020-Jan-29