Do binary search and return index of element containing value, or zero if not found. array must be sorted into ascending order beforehand. If the array subscripts dont start at 1, then pass the actual index of the first element as first', then, if the element isnt found, the value returned is first' minus 1. To restrict the search to a subsection of the array supply low and/or high.