|
|
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_Table, seg_04ea1b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Table;
with Text_Io;
with Io;
procedure Test_Table is
function Cle (N : Natural) return Natural is
begin
return N;
end Cle;
function Image (N : Natural) return String is
begin
return Natural'Image (N);
end Image;
package T is new Table (Item => Natural,
Max_Item => 5,
Max_Taille_Hash => 3,
Cle => Cle,
Image => Image);
begin
declare
Choix : Character;
Tab : T.Object;
N, M : Natural;
Iter : T.Iterateur;
begin
T.Initialise (Tab);
loop
Text_Io.Put_Line
("(a)jouter (s)upprimer (m)odifier (i)ter Iter(k)ey (f)in ????");
Text_Io.Get (Item => Choix);
case Choix is
when 'a' =>
Io.Put ("ajouter Item : ");
Io.Get (Item => N, Width => 0);
T.Add_Item (Tab, N);
T.Dump (Tab);
when 's' =>
Io.Put ("Supprimer Item : ");
Io.Get (Item => N, Width => 0);
T.Rem_Item (Tab, N);
T.Dump (Tab);
when 'm' =>
Io.Put ("modifier Item : ");
Io.Get (Item => N, Width => 0);
Io.Put ("Par : ");
Io.Get (Item => M, Width => 0);
T.Mod_Item (O => Tab, I => N, Par => M);
T.Dump (Tab);
when 'i' =>
Iter := T.First_Item (Tab);
while not T.End_Of_Iter (Iter) loop
Text_Io.Put (Natural'Image
(T.Current_Item (Iter, Tab)) & "->");
T.Next_Item (Iter, Tab);
end loop;
Text_Io.New_Line;
when 'k' =>
Io.Put ("key : ");
Io.Get (Item => N, Width => 0);
Iter := T.First_Item (Tab, N);
while not T.End_Of_Iter (Iter) loop
Text_Io.Put (Natural'Image
(T.Current_Item (Iter, Tab)) & "->");
T.Next_Item (Iter, Tab);
end loop;
Text_Io.New_Line;
when 'f' =>
exit;
when others =>
Text_Io.Put_Line ("y a pas cette option !!");
end case;
end loop;
end;
end Test_Table;
nblk1=4
nid=4
hdr6=6
[0x00] rec0=27 rec1=00 rec2=01 rec3=02e
[0x01] rec0=16 rec1=00 rec2=02 rec3=012
[0x02] rec0=13 rec1=00 rec2=03 rec3=000
[0x03] rec0=04 rec1=9e rec2=01 rec3=442
tail 0x2154a2c32876f7e122dea 0x42a00088462060003
Free Block Chain:
0x4: 0000 00 00 03 02 80 2d 20 54 65 78 74 5f 49 6f 2e 4e ┆ - Text_Io.N┆