' *** BIN_WORD.LST *** 2nd GFA-Manual, page 5-6 > PROCEDURE bin_search_word(element,VAR proc(),index,ok!) ' ' *** Find element in sorted word-array with 'binary search' ' *** If successful, index of found element is returned and ok!=TRUE ' LOCAL first,last,middle first=0 last=PRED(DIM?(proc())) WHILE firstproc(middle) first=SUCC(middle) ELSE last=middle ENDIF WEND ok!=(proc(first)=element) IF ok! index=first ELSE index=0 ENDIF RETURN ' ********* '