# File lib/librbdiscrete.rb, line 302
def binary_search(binary, size, searchKey, low, middle, high)
    while (low <= high)
        middle=(low+high)/2;
        print_row(binary, size, low, middle, high);
        if (searchKey == binary[middle])
            return middle;
        elsif (searchKey <= binary[middle])
            high=middle-1
        else 
            low=middle+1
        end
    end
end