At 5:57 AM -0800 4/1/99, [EMAIL PROTECTED] wrote:
>It is great algorithm for searching, but insertions of course are much more
>work. Like almost everything in programming, it is a trade off.
Insertions aren't more work either, you just call DmFindSortPosition and
then insert the new record at that position by passing that index to
DmAttachRecord or DmMoveRecord.
Or, you can sort an unsorted database with DmQuickSort, or use
DmInsertionSort if the database is already mostly sorted.
The only extra (programming) work is writing the comparison function, which
in most cases is only a few lines.
Really, there's almost no downside, and you should probably never even
consider having a multi-thousand record database that isn't sorted somehow.
--Bob