Lazarus help needed lazarus / 9-Editor ---------------------------------------------------------------------- M en M · 2009-01-11 21:02 Hello, We need advice about our Lazarus project. We are building a small football competition calculator. What works now: - Filling in 4 teams, and transferring them to the rankings. - Filling in match results and giving winning teams points. - Sorting the teams on amount of points earned But what not works! When 2 teams have the same amount of points, we want them to sort based on amount of goals scored. So, when the first sorting requirement is not able to sort 2 teams out, we want them to sort out on a second requirement. We already put a lot of hours in it  Help would be very welcome ---------------------------------------------------------------------- Leledumbo · 2009-01-12 05:25 Try implementing a Bucket Sort. ---------------------------------------------------------------------- Vincent Snijders · 2009-01-12 07:41 How (what algorithm and what implementation) do you sort the teams? I would think that the function to compare two teams needs to be adjusted. ---------------------------------------------------------------------- arnix · 2009-01-16 20:14 M en M How do you keep the data? If it is SQL just use something like: SELECT * FROM teams ORDER BY points DESC, goals DESC, goals_in ASC If you show your code I'm sure we can provide more help, it all depends on the way you are storing your data.