Board index » delphi » Quick sort code needed for BP7

Quick sort code needed for BP7

Does anyone have code to quick sort the folowing data structure
and update the key record file?

  KeyRec = record
   RecNo  : longInt;
   Hold     : array [1..10] of word;
   PLHold : Single;
  end;

This is a BIG file and I need to sort on RecNo
which points to the actual data file.

Any constructive help for FAST sorts on a large number of files
will be appreciated.

 

Re:Quick sort code needed for BP7


Quote
In article <34E5EF22.2FD89...@sprintmail.com> Geary Formby <gfor...@sprintmail.com> writes:
>Does anyone have code to quick sort the folowing data structure
>and update the key record file?
>  KeyRec = record
>   RecNo  : longInt;
>   Hold     : array [1..10] of word;
>   PLHold : Single;
>  end;
>This is a BIG file and I need to sort on RecNo
>which points to the actual data file.
>Any constructive help for FAST sorts on a large number of files
>will be appreciated.

I would suggest shopping around for a commercial sorting utility (any
suggestions?) if this is a huge file and/or it is going to be frequently
sorted, or if you have a number of related sorting requirements.

If it is not, then packages such as SysTools (Turbopower Software) contain a
very nice sort-engine.  I would purchase and use such a utility and hope for
the best.  The engine they provide is fairly clever, employing a combination
of heapsort and mergesort methods, and it can handle large files.  Full source
code is provided of course.

Other Threads