mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-16 10:02:33 +02:00
23 lines
411 B
ObjectPascal
23 lines
411 B
ObjectPascal
Unit MySortC;
|
|
|
|
Interface
|
|
|
|
Uses Objects;
|
|
|
|
Type
|
|
PMySortedCollection = ^TMySortedCollection;
|
|
TMySortedCollection = Object(TSortedCollection)
|
|
Function Compare (Key1,Key2 : Pointer): Sw_integer; virtual;
|
|
end;
|
|
|
|
Implementation
|
|
|
|
Uses MyObject;
|
|
|
|
Function TMySortedCollection.Compare (Key1,Key2 : Pointer) :sw_integer;
|
|
|
|
begin
|
|
Compare:=PMyobject(Key1)^.GetField - PMyObject(Key2)^.GetField;
|
|
end;
|
|
|
|
end. |