|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body List_Generic, seg_0522d5
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
package body List_Generic is function Nil return List is begin return null; end Nil; function Is_Empty (L : List) return Boolean is begin return L = Nil; end Is_Empty; function First (L : List) return Element is begin return L.First; end First; function Rest (L : List) return List is begin return L.Rest; end Rest; function Make (X : Element; L : List) return List is begin return new Listdata'(X, L); end Make; procedure Set_Rest (L : List; To_Be : List) is begin L.Rest := To_Be; end Set_Rest; procedure Set_First (L : List; To_Be : Element) is begin L.First := To_Be; end Set_First; procedure Free (L : in out List) is begin L := null; end Free; function Length (L : List) return Natural is Count : Natural := 0; Iter : Iterator; begin Init (Iter, L); while not Done (Iter) loop Count := Count + 1; Next (Iter); end loop; return Count; end Length; procedure Init (Iter : out Iterator; L : List) is begin Iter := Iterator (L); end Init; procedure Next (Iter : in out Iterator) is begin Iter := Iterator (Iter.Rest); end Next; function Value (Iter : Iterator) return Element is begin return Iter.First; end Value; function Done (Iter : Iterator) return Boolean is begin return Iter = null; end Done; end List_Generic;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=2e rec1=00 rec2=01 rec3=032 [0x01] rec0=20 rec1=00 rec2=02 rec3=000 tail 0x2154baa3c87a0679bc109 0x42a00088462063203