\\ binary search const N=10 Dim A(0 to N-1) A(0):=1,2,3,4,5,6,8,9,10,11 Print Len(A())=10 Function BinarySearch(&A(), aValue) { def long mid, lo, hi def boolean ok=False let lo=0, hi=Len(A())-1 While lo<=hi mid=(lo+hi)/2 if A(mid)>aValue Then hi=mid-1 Else.if A(mid)=0 then Print "found i at index: ";where else where=-where-1 if where