mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
24 lines
371 B
ObjectPascal
24 lines
371 B
ObjectPascal
{$mode objfpc}
|
|
|
|
uses
|
|
ugeneric10;
|
|
|
|
type
|
|
TMyIntList = specialize TList<integer>;
|
|
|
|
function CompareInt(const Item1, Item2: Integer): Integer;
|
|
begin
|
|
Result := Item2 - Item1;
|
|
end;
|
|
|
|
var
|
|
ilist : TMyIntList;
|
|
someInt : integer;
|
|
begin
|
|
someInt:=10;
|
|
ilist := TMyIntList.Create;
|
|
ilist.add(someInt);
|
|
ilist.sort(ilist.TCompareFunc(@CompareInt));
|
|
writeln('ok');
|
|
end.
|