TCollectionSortCompare procedure type
Callback to sort collection items.
Declaration
TCollectionSortCompare = function(Item1: TCollectionItem;
Item2: TCollectionItem): IntegerDescription
TCollectionSortCompare is the prototype for a callback used in
the
Sort method. The procedure should compare
Item1 and
Item2 and return an integer:
- Result < 0
- if
Item1comes beforeItem2 - Result = 0
- if
Item1is at the same level asItem2 - Result > 0
- if
Item1comes afterItem2
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
