|
|
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 - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Generic_List, seg_047c38
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Generic_List, Text_Io;
procedure Test_Generic_List is
package My_List is new Generic_List (Integer, "=");
Alist, Alist2 : My_List.Object;
Aniterator : My_List.Iterator;
begin
My_List.Free (Alist);
Text_Io.Put_Line ("destruction du chiffre 5");
My_List.Delete (Alist, 5);
Text_Io.Put_Line ("liste vide = " &
Boolean'Image (My_List.Is_Empty (Alist)));
for I in 1 .. 10 loop
My_List.Add (Alist, I);
end loop;
Text_Io.Put_Line ("liste vide = " &
Boolean'Image (My_List.Is_Empty (Alist)));
My_List.Initialize (Aniterator, Alist);
Text_Io.Put_Line ("iterateur init sur le premier elt qui est");
Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
Text_Io.Put_Line ("elts de la liste :");
while not My_List.At_End (Aniterator) loop
Text_Io.Put (Integer'Image (My_List.Consult (Aniterator)));
My_List.Next (Aniterator);
end loop;
Text_Io.Put_Line ("existence de 4");
Text_Io.Put_Line (Boolean'Image (My_List.Is_In_List (Alist, 4)));
Text_Io.Put_Line ("existence de 20");
Text_Io.Put_Line (Boolean'Image (My_List.Is_In_List (Alist, 20)));
Text_Io.Put_Line ("destruction du chiffre 1");
My_List.Delete (Alist, 1);
My_List.Initialize (Aniterator, Alist);
Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
while not My_List.At_End (Aniterator) loop
Text_Io.Put (Integer'Image (My_List.Consult (Aniterator)));
My_List.Next (Aniterator);
end loop;
Text_Io.Put_Line ("destruction du chiffre 10");
My_List.Delete (Alist, 10);
My_List.Initialize (Aniterator, Alist);
Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
while not My_List.At_End (Aniterator) loop
Text_Io.Put (Integer'Image (My_List.Consult (Aniterator)));
My_List.Next (Aniterator);
end loop;
My_List.Close (Aniterator);
-- Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
Text_Io.Put_Line ("deep_copy de la liste");
My_List.Deep_Copy (Alist, Alist2);
Text_Io.Put_Line ("deep_copy bien effectuee");
My_List.Initialize (Aniterator, Alist2);
Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
while not My_List.At_End (Aniterator) loop
Text_Io.Put (Integer'Image (My_List.Consult (Aniterator)));
My_List.Next (Aniterator);
end loop;
My_List.Close (Aniterator);
Text_Io.Put_Line ("destruction de la liste copiee");
Text_Io.Put_Line ("destruction du chiffre 4");
My_List.Delete (Alist, 4);
My_List.Initialize (Aniterator, Alist);
Text_Io.Put_Line (Integer'Image (My_List.Consult (Aniterator)));
while not My_List.At_End (Aniterator) loop
Text_Io.Put (Integer'Image (My_List.Consult (Aniterator)));
My_List.Next (Aniterator);
end loop;
My_List.Close (Aniterator);
end Test_Generic_List;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=1a rec1=00 rec2=01 rec3=044
[0x01] rec0=18 rec1=00 rec2=03 rec3=016
[0x02] rec0=18 rec1=00 rec2=04 rec3=00e
[0x03] rec0=05 rec1=00 rec2=02 rec3=000
tail 0x21544d30286574835e902 0x42a00088462060003