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

⟦027e8b578⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package List_Generic, pragma Module_Name 4 710, pragma Subsystem Abstract_Types, seg_028508

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



generic
    type Element is private;
    -- must be a pure value
    -- ie. no initialization or finalization is necessary
    -- = and := are equality and copy

    pragma Must_Be_Constrained (Yes => Element);

package List_Generic is
    pragma Subsystem (Abstract_Types, Private_Part => Open);
    pragma Module_Name (4, 710);

    type List is private;
    -- may generate garbage
    -- = and := operate on references
    -- "make" constructs lists with structural sharing

    -- constraint error is raised when nil i provided to any of
    --    first, rest, set_first, or set_rest

    function Make (X : Element; L : List) return List;

    function Nil                 return List;
    function Is_Empty (L : List) return Boolean;

    procedure Free (L : in out List);
    -- make L empty

    function  First     (L : List) return Element;
    function  Rest      (L : List) return List;
    procedure Set_Rest  (L : List; To_Be : List);
    procedure Set_First (L : List; To_Be : Element);

    function Length (L : List) return Natural;

    type Iterator is private;

    procedure Init  (Iter : out Iterator; L : List);
    procedure Next  (Iter : in out Iterator);
    function  Value (Iter : Iterator) return Element;
    function  Done  (Iter : Iterator) return Boolean;

private

    type Listdata;
    type List is access Listdata;
    -- variables of type list are initialized to null

    type Listdata is
        record
            First : Element;
            Rest  : List;
        end record;

    type Iterator is new List;

end List_Generic;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=004
        [0x01] rec0=1a rec1=00 rec2=02 rec3=000
    tail 0x217223e8883c174c6d04a 0x42a00088462065003