/*=================( Binary search word )==================*/ BiSearchWord: Procedure Expose stem. Arg search, wordPos If DataType( wordPos ) <> 'NUM' Then wordPos = 1 found = 0 /* Index of the found Item */ bottom = 1 top = stem.0 Do While found = 0 & top >= bottom mean = (bottom + top) % 2 searchValue = Word( stem.mean, wordPos ) If search = searchValue Then found = mean Else If search < searchValue Then top = mean - 1 Else bottom = mean + 1 End Return found /*** End BiSearchWord ***/