experchange > delphi

Oliver Bleckmann (05-09-05, 11:14 AM)
Hey there,
I have a little question for you,
how do I realise a progy, which stores an adressbook (name, city,
phone,etc.) in alphabetical order?
what record structur do i need (must be sortable) and how do i determin the
end of that record,
especially, when it is restored from a file (the eof thing, you know!)?
Maarten Wiltink (05-09-05, 01:41 PM)
"Oliver Bleckmann" <Oliver-Bleckmann> wrote in message
news:vnn1

> how do I realise a progy, which stores an adressbook (name, city,
> phone,etc.) in alphabetical order?


Sort the records before presentation.

> what record structur do i need (must be sortable)


Sorting algorithms depend only on the compareability of the elements.
Generic sorting procedures tend to take a list and a comparison
function as parameters.

> and how do i determin the end of that record, especially,
> when it is restored from a file (the eof thing, you know!)?


Use a while loop over (not Eof()).

Groetjes,
Maarten Wiltink
Similar Threads