-- PUT AND GET 10 INTEGERS IN SEQUENCE USING X0SEQ PACKAGE

with Instrument, X0seq;
use Instrument;

procedure Sqpga2 is

    package Intseq is new X0seq (50, Integer);

    use Intseq;

    My_Sequence : Sequence;

    X : Integer;

begin

    Start ("SQPGA2", "PUT_NEXT 10 ELEMENTS,RESET AND GET_NEXT THE 10 ");
    for Ii in 1 .. 1000 loop
        for I in 1 .. 10 loop

            Put_Next (My_Sequence, I);

        end loop;

        Reset (My_Sequence);

        for I in 1 .. 10 loop

            Get_Next (My_Sequence, X);

            if

               I /= X

                then

                Comment ("GET_NEXT DOES NOT GET THE CORRECT SEQUENCE ELEMENT");

            end if;

        end loop;
    end loop;
    Stop;

end Sqpga2;