Sign in Join
FPDoc Onlineexperiment

TCollection.Sort procedure

Member of TCollectionpublicIn unit Classes

Sort the items in the collection.

Declaration

pascal
procedure Sort(const Compare: TCollectionSortCompare)
procedure Sort(const Compare: TCollectionSortCompare_Context; 
 Context: Pointer)

Description

Sort sorts the items in the collection, and uses the Compare procedure to compare 2 items in the collection. It is more efficient do use this method than to perform the sort manually, because the list items are manipulated directly.

For more information on how the Compare function should behave, see the TCollectionSortCompare type.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.