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

⟦aa5d4c50f⟧ TextFile

    Length: 2037 (0x7f5)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦4c85d69e2⟧ 
                └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─⟦129cab021⟧ »DATA« 
        └─⟦9b477e385⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─⟦6f12a12be⟧ »DATA« 
        └─⟦9b477e385⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─⟦d65440be7⟧ »DATA« 
        └─⟦9b477e385⟧ 
            └─⟦this⟧ 

TextFile

package body Stack_Generic is

    type Stack_Node is
        record
            Elt  : Element;
            Link : Stack;
        end record;

    procedure Make_Empty (S : in out Stack) is
    begin
        S := null;
    end Make_Empty;

    procedure Pop (S : in out Stack) is
    begin
        if S = null then
            raise Underflow;
        else
            S := S.Link;
        end if;
    end Pop;


    procedure Push (X : Element; S : in out Stack) is
        New_Node : Stack;
    begin
        New_Node := new Stack_Node'(Elt => X, Link => S);
        S        := New_Node;
    end Push;


    function Empty (S : Stack) return Boolean is
    begin
        return S = null;
    end Empty;


    function Top (S : Stack) return Element is
    begin
        if S = null then
            raise Underflow;
        else
            return S.Elt;
        end if;
    end Top;

    procedure Copy (Target : in out Stack; Source : Stack) is
        Rest_Of_Source : Stack;
        Last_Of_Target : Stack;
    begin
        if Source /= null then
            Target := new Stack_Node'(Elt => Source.Elt, Link => null);

            Last_Of_Target := Target;
            Rest_Of_Source := Source.Link;
            while Rest_Of_Source /= null loop
                Last_Of_Target.Link :=
                   new Stack_Node'(Elt => Rest_Of_Source.Elt, Link => null);
                Last_Of_Target      := Last_Of_Target.Link;
                Rest_Of_Source      := Rest_Of_Source.Link;
            end loop;
        else
            Target := null;
        end if;
    end Copy;

    procedure Init (Iter : out Iterator; S : Stack) is
    begin
        Iter := Iterator (S);
    end Init;

    procedure Next (Iter : in out Iterator) is
    begin
        Iter := Iterator (Iter.Link);
    end Next;

    function Value (Iter : Iterator) return Element is
    begin
        return Iter.Elt;
    end Value;

    function Done (Iter : Iterator) return Boolean is
    begin
        return Iter = null;
    end Done;

end Stack_Generic;