with Searching;
with System;
use System;
with Instrument;
use Instrument;
procedure Bsrca2 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;

    T1 : constant Table (Big_Integer'First .. Big_Integer'First + 2) := "XYZ";

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

begin
    Start ("BSRCA2", " BINARY SEARCH PACKAGE TEST AT EXTREME AND" &
                        "LIMITS OF ITS INDEXTYPE : LOWER LIMIT");

    for I in 1 .. 1 loop
        begin
            Let (Global, 0);
            for C in reverse Alpha loop
                Key := C;
                Index := Index_Of (Key, Within => T1);
            end loop;
        exception
            when Not_Found =>
                Comment (" NOT FOUND");
        end;
    end loop;
    Stop;
end Bsrca2;