Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-01

any existing units/libraries for sorting?

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis

I have a list of records (each with a few fields). I want to let users display this list of records in ascending orders of any record field.
Is there any existing units/library I can use?

Thanks in advance.

Dennis

Ryan Joseph
to Dennis

Determine the sorting key for each of the fields and use quick sort? If the field you’re sorting by is a name for example then use alphabetic order. Sounds like a generic sorting by comparison problem and doesn’t require any specific library.

Show quoted text 7 lines
On Jan 3, 2018, at 10:09 PM, Dennis wrote: I have a list of records (each with a few fields). I want to let users display this list of records in ascending orders of any record field. Is there any existing units/library I can use? Thanks in advance.

Regards,
Ryan Joseph

Dennis Poon
to Santiago A.
Santiago A. wrote 5 lines
El 03/01/2018 a las 16:09, Dennis escribió: > I have a list of records (each with a few fields). What do you mean with list? A TList? You can use sort method

Thanks for the reminder. I forgot about it.

Dennis