Angus Mezick <angus@EDGIL.CCMAIL.COMPUSERVE.COM> writes: > nope, B-Search depends on the idnums being in order. they can get out of order > in the file. have a player delete and then recreat and then modify showplay to > display the idnum. i had You misunderstand me. Gaps are fine for binary searches -- but the list being unsorted isn't. qsort before using the bsearch, or alter the code so that it only makes new players at the end of the database. That way, the ids will be monotonic, at the price of a slight disk space increase (which is undone at every purge). A gap would be 1, 2, 3, 500, 504, 505. A bsearch works just fine on this list. -- James Turner turnerjh@xtn.net http://www.vuse.vanderbilt.edu/~turnerj1/ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST