mysortc.pp 411 B

1234567891011121314151617181920212223
  1. Unit MySortC;
  2. Interface
  3. Uses Objects;
  4. Type
  5. PMySortedCollection = ^TMySortedCollection;
  6. TMySortedCollection = Object(TSortedCollection)
  7. Function Compare (Key1,Key2 : Pointer): Sw_integer; virtual;
  8. end;
  9. Implementation
  10. Uses MyObject;
  11. Function TMySortedCollection.Compare (Key1,Key2 : Pointer) :sw_integer;
  12. begin
  13. Compare:=PMyobject(Key1)^.GetField - PMyObject(Key2)^.GetField;
  14. end;
  15. end.