with Searching;
with System;
use System;
with Instrument;
use Instrument;
procedure Bsrca3 is

    type Big_Integer is range Min_Int .. Max_Int;
    type Table is array (Big_Integer range <>) of Character;

    package Table_Search is new Searching (Big_Integer, Character, Table);
    use Table_Search;

    T2 : constant Table (Big_Integer'First .. Big_Integer'First + 3) := "ABCD";

    Index : Big_Integer;
    Key : Character;
    subtype Alpha is Character range 'A' .. 'D';
    package Pr is new Procs (Integer);
    use Pr;

begin
    Start ("BSRCA3", " BINARY SEARCH PACKAGE TEST AT EXTREME AND" &
                        "LIMITS OF ITS INDEXTYPE : LOWER LIMIT");
    for I in 1 .. 1000 loop
        Let (Global, 0);
        begin
            for C in Alpha loop
                Key := C;
                Index := Index_Of (Key, Within => T2);
                --         PUT_MATCH(INDEX, KEY);
            end loop;
        exception
            when Not_Found =>
                --         PUT("KEY '");
                --         PUT(KEY);
                Comment (" NOT FOUND");
        end;
    end loop;
    Stop;
end Bsrca3;