Sign in Join
FPDoc Onlineexperiment

TFPObjectList.Sort procedure

Member of TFPObjectListpublicIn unit Contnrs

Sort the list of objects.

Declaration

pascal
procedure Sort(Compare: TListSortCompare)

Arguments

Compare

Compare function for two objects.

Description

Sort will perform a quick-sort on the list, using Compare as the compare algorithm. This function should accept 2 pointers and should return the following result:

less than 0
If the first pointer comes before the second.
equal to 0
If the pointers have the same value.
larger than 0
If the first pointer comes after the second.

The function should be able to deal with Nil values.

Errors

None.

See also

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