How to sort a Tlist? lazarus / 8-Other ---------------------------------------------------------------------- Flanipuche · 2006-02-17 08:09 Hi. I want to sort a Tlist, but errors occurs. I try it with Delphy and it works. Code: [Select] var     MyList:TList; ... function MySort(Item1,Item2:pointer):integer; begin .. end; .. Mylist.sort(MySort); .. I have this error: Wrong number of parameters specified and Hint: found declaration: MySort(pointer,pointer):longint; What's wrong in my code? :shock: ---------------------------------------------------------------------- RudieD · 2006-02-17 11:48 Can you try Mylist.sort(@MySort) ? ---------------------------------------------------------------------- Flanipuche · 2006-02-17 23:13 Fine! It's work now. Thank you for your help. ---------------------------------------------------------------------- Marc · 2006-02-20 15:41 if you put {$mode delphi} at the start of your source you don't have to add the @ ---------------------------------------------------------------------- Flanipuche · 2006-02-20 20:47 iI did not know this option.  Thank you.