/*==============( Binary search )================*/ BiSearch: Procedure Expose stem. Parse Arg value /* Search value */ found = 0 /* Index of the found Item */ bottom = 1 /* Index of the first Item */ top = stem.0 /* Index of the last Item */ Do While found = 0 & top >= bottom mean = (bottom + top) % 2 If value == stem.mean Then found = mean Else If value < stem.mean Then top = mean - 1 Else bottom = mean + 1 End Return found /*** End BiSearch ***/