Unit 'fgl' Package
[Overview][Constants][Types][Classes][Index] [#rtl]

TFPGInterfacedObjectList.Sort

Sort the objects in the list.

Declaration

Source position: fgl.pp line 242

public procedure TFPGInterfacedObjectList.Sort(

  Compare: TCompareFunc

);

procedure TFPGInterfacedObjectList.Sort(

  Compare: TCompareFunc;

  SortingAlgorithm: PSortingAlgorithm

);

Arguments

Compare

  

Compare function for 2 objects: function(const Item1, Item2: T): Integer;

Arguments

Compare

  

Compare function for 2 objects: function(const Item1, Item2: T): Integer;

Description

Sort sorts the elements in the list using the provided Compare function. The list passes 2 items to the compare function. The result of this function determines how the items will be sorted:

Errors

None.

See also

TFPSList.Sorted


Documentation generated on: Dec 25 2024