DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦685dcb3a1⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Generic_Condition_Element, seg_04a330, seg_04a9d9, seg_04b446

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



package body Generic_Condition_Element is

    type Elements is array (Positive range <>) of Fact_Query;

    The_Elements : Elements (1 .. Max_Condition_Elements) :=
       (others => Null_Fact_Query);

    The_Last_Element : Natural := 0;

    procedure Add (The_Query : Fact_Query; Result : out Id) is
    begin
        if The_Last_Element = Max_Condition_Elements then
            raise Overflow;
        else
            The_Last_Element                := The_Last_Element + 1;
            The_Elements (The_Last_Element) := The_Query;
            Result                          := The_Last_Element;
        end if;
    end Add;

    procedure Add (The_Queries : Fact_Queries; Result : out Ids) is
    begin
        if The_Last_Element + The_Queries'Length > Max_Condition_Elements then
            raise Overflow;
        else
            for I in The_Queries'Range loop
                The_Last_Element                := The_Last_Element + 1;
                The_Elements (The_Last_Element) := The_Queries (I);
                Result (I)                      := The_Last_Element;
            end loop;
        end if;
    end Add;

    function Count return Natural is
    begin
        return The_Last_Element;
    end Count;


    function Get (The_Id : Id) return Fact_Query is
    begin
        if (The_Id > The_Last_Element) or (The_Id = 0) then
            raise Illegal_Access;
        else
            return The_Elements (The_Id);
        end if;
    end Get;

    function Get (The_Ids : Ids) return Fact_Queries is
        Result : Fact_Queries (The_Ids'Range);
    begin
        for I in The_Ids'Range loop
            Result (I) := Get (The_Ids (I));
        end loop;
        return Result;
    end Get;

end Generic_Condition_Element;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=1d rec1=00 rec2=01 rec3=012
        [0x01] rec0=1f rec1=00 rec2=02 rec3=001
    tail 0x2174ea30c866e7caf0192 0x42a00088462063c03