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

⟦ee732397c⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Id_Object, seg_056f60

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



with The_List_Generic;

package body Id_Object is

    package The_Pack_Of_Id is new The_List_Generic (Type_Element => Type_Id);

    The_List_Of_Id : The_Pack_Of_Id.The_List;

    -- ********************************
    procedure Give_Id (The_Id : out Type_Id) is

        Our_Id : Type_Id := Type_Id (0);
        Counter : Natural;
        Test : Boolean := False;
    begin
        if The_Pack_Of_Id.Is_Empty (The_List_Of_Id) then

            -- List vide
            -- =========
            Our_Id := Type_Id (1);
            The_List_Of_Id := The_Pack_Of_Id.Make (Our_Id, The_List_Of_Id);
            The_Id := 1;

        else
            Counter := 1;       -- utile pour lisibilite du programme
            Our_Id := Type_Id (Counter);

            -- recherche et effacement de l'identificateur
            -- ===========================================
            while The_Pack_Of_Id.Search (The_List_Of_Id, Our_Id) loop
                Counter := Counter + 1;
                Our_Id := Type_Id (Counter);
            end loop;

            -- ajout de l'identificateur;
            The_List_Of_Id := The_Pack_Of_Id.Make (Our_Id, The_List_Of_Id);
            The_Id := Our_Id;
        end if;
    end Give_Id;

    -- ********************************
    function Delete_Id (The_Id : in Type_Id) return Boolean is
        Is_Ok : Boolean := False;
    begin  
        if The_Pack_Of_Id.Is_Empty (The_List_Of_Id) then
            -- List vide
            -- =========
            return False;
        else

            -- List non vide
            -- =============
            The_Pack_Of_Id.Delete (The_List_Of_Id, The_Id, Is_Ok);
            return Is_Ok;
        end if;
    end Delete_Id;

end Id_Object;

E3 Meta Data

    nblk1=3
    nid=3
    hdr6=4
        [0x00] rec0=20 rec1=00 rec2=01 rec3=026
        [0x01] rec0=1c rec1=00 rec2=02 rec3=000
        [0x02] rec0=1f rec1=00 rec2=02 rec3=000
    tail 0x2176397c487c58e920524 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 00 00 04 00 01 20 01 00 00 00 00 00 00 00 00  ┆                ┆