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

⟦2f6943615⟧ TextFile

    Length: 1190 (0x4a6)
    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

package body X0que is

    --EMPTY A QUEUE
    procedure Make_Empty (Q : in out Queue) is
    begin
        Q.Qctr := 0;
    end Make_Empty;

    --TEST IF A QUEUE IS EMPTY
    function Is_Empty (Q : in Queue) return Boolean is
    begin
        return Q.Qctr = 0;
    end Is_Empty;

    --TEST IF A QUEUE IS NOT EMPTY
    function Is_Not_Empty (Q : in Queue) return Boolean is
    begin
        return Q.Qctr /= 0;
    end Is_Not_Empty;

    --TEST IF A QUEUE IS FULL
    function Is_Full (Q : in Queue) return Boolean is
    begin
        return Q.Qctr = Max;
    end Is_Full;

    --ADD AN ELEMENT_TYPE TO THE END OF THE QUEUE
    procedure Put_End (Q : in out Queue; C : in Element_Type) is
    begin
        Q.Qctr := Q.Qctr + 1;
        Q.Qu (Q.Qctr) := C;
    end Put_End;

    --GET AN ELEMENT_TYPE FROM THE FRONT OF THE QUEUE
    procedure Get_End (Q : in out Queue; C : out Element_Type) is
    begin
        C := Q.Qu (Q.Qctr);
        Q.Qctr := Q.Qctr - 1;
    end Get_End;

    --ASSIGN THE FIRST QUEUE TO THE SECOND QUEUE
    procedure Assign (Qin : in Queue; Qout : out Queue) is
    begin
        Qout.Qctr := Qin.Qctr;
        Qout.Qu := Qin.Qu;
    end Assign;

end X0que;