home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / objectex / mysortc.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  411 b   |  23 lines

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