sort algorithm trouble...

Robert III Lockhart wrote in message <>...
>ok, this compiles and looks right, but will not do the job... can
>someone please advise me?
>The sort algorithm seems to rewrite the file instead of sorting it... I
>think I'm doing it right... obviously not though...
>If you try to run the program the txt file is also attached.

Since this appears to be a work in progress, my comments are only limited to
the 'SortFile' procedure:
To get the sort to work, you have to modify the 'next' (pointer) *field* of
the records, not only for the 'current' and 'next' records, but also the
'previous' record pointer or the 'first' record pointer if the record to be
swapped is the first record.  I've also noticed that you aren't saving the
result of the sort afterwards.  That, of course, can be added later.

hope that's enough of a hint,