[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Contnrs' (#fcl)

TFPObjectList.Sort

Sort the list of objects

Declaration

Source position: contnrs.pp line 61

public procedure TFPObjectList.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

#rtl.classes.TList.Sort


Documentation generated on: May 14 2021