|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....|
|Home BasePack DStruct Class TStringArray Methods Sort|
|See also: UnSort, SortOrder, CommitSorting, FindCellInSortedColumn, OnBeforeSortExchange|
The method Sort sorts the rows of the string array according to the elements of column Col. In the case of equal elements in column Col the elements of column ColSec are used as a secondary sorting key. ColSec may be set to negative values in order to suppress secondary sorting.
The order of sorting is determined by the parameter Ascending. The sorting is performed by a modified bubble sort (CombSort), which has been reported to be comparable in speed to QuickSort (see also R.Box, S. Lacey, BYTE magazine, April 1991).
The sorting process triggers the OnPercentDone event in order to be able to provide feedback to the user during time consuming sort tasks.