Path: utzoo!attcan!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!mips!apple!baum From: baum@Apple.COM (Allen J. Baum) Newsgroups: comp.sys.mac.hypercard Subject: Re: Binary Search handler 2nd attemp Message-ID: <38843@apple.Apple.COM> Date: 21 Feb 90 18:51:11 GMT References: <1124woodl@yvax.byu.edu> Reply-To: baum@apple.UUCP (Allen Baum) Organization: Apple Computer, Inc. Lines: 21 [] >In article <1124woodl@yvax.byu.edu> woodl@yvax.byu.edu writes: > > I have a binary search handler that I have found very useful for >maintaing dynamic lists of cards in both HyperCard and SuperCard >applications. It is very fast and can be used to create the lists, one >item at a time, and for adding items to the list as well as deleting >items from the list. ... >function BinarySearch WindowName, CardName, FieldName, value ... I wrote one of these also, and found it useful to handle the special cases where the new line(item, word, whatever) to be inserted would be inserted immediately after the last thing that was inserted, or after the last thing in the field. This optimizes the common cases of partially sorted inputs. -- baum@apple.com (408)974-3385 {decwrl,hplabs}!amdahl!apple!baum