DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦3c57a6a07⟧ TextFile

    Length: 2235 (0x8bb)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Unchecked_Deallocation;
package body Generator_Of_Dynamic_Items is

    procedure Dispose is new Unchecked_Deallocation (Integer, Item_Type);

    procedure Generate (Vector : in out Vector_Type) is
        Temp : Item_Type;
    begin
        for I in Vector'Range loop
            Vector (I) := new Integer'(I);
        end loop;
        for I in reverse Vector'Range loop
            if I mod 3 /= 0 then
                Assign (Temp, Vector (Vector'First));
                Assign (Vector (Vector'First), Vector (I));
                Assign (Vector (I), Temp);
            end if;
        end loop;
    end Generate;

    procedure Generate2 (Vector : in out Vector_Type) is
        Temp : Item_Type;
    begin
        for I in Vector'Range loop
            Vector (I) := new Integer'(I + Vector'Last);
        end loop;
        for I in reverse Vector'Range loop
            if I mod 3 /= 0 then
                Assign (Temp, Vector (Vector'First));
                Assign (Vector (Vector'First), Vector (I));
                Assign (Vector (I), Temp);
            end if;
        end loop;
    end Generate2;

    procedure Generate_Ascending (Vector : in out Vector_Type) is
    begin
        for I in Vector'Range loop
            Vector (I) := new Integer'(I);
        end loop;
    end Generate_Ascending;

    procedure Generate_Descending (Vector : in out Vector_Type) is
    begin
        for I in Vector'Range loop
            Vector (I) := new Integer'(Vector'Last - I + Vector'First);
        end loop;
    end Generate_Descending;

    procedure Assign (Dest : in out Item_Type; Source : in Item_Type) is
    begin
        if Dest = Source then
            return;
        else
            Dispose (Dest);
            Dest := new Integer'(Source.all);
        end if;
    end Assign;

    procedure Destroy (Item : in out Item_Type) is
    begin
        Dispose (Item);
    end Destroy;

    function Equals (Left, Right : Item_Type) return Boolean is
    begin
        return not (Left = null or Right = null) and then Left.all = Right.all;
    end Equals;

    function Less (Left, Right : Item_Type) return Boolean is
    begin
        return Left.all < Right.all;
    end Less;

end Generator_Of_Dynamic_Items;