Logo

Programming-Idioms

History of Idiom 100 > diff from v20 to v21

Edit summary for version 21 by :
[Pascal] inv char at end

Version 20

2016-03-20, 23:28:12

Version 21

2016-03-20, 23:28:49

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Imports
uses classes;
Imports
uses classes;
Code
with TList.Create do try
  Sort(c);
finally
  Free;
end;�
Code
with TList.Create do try
  Sort(c);
finally
  Free;
end;
Comments bubble
c must be of type function (Item1, Item2: Pointer): Integer;�
Comments bubble
c must be of type function _(Item1, Item2: Pointer): Integer;