|
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: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Table, seg_04eed9
└─⟦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; 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' => if T.Is_Full (Tab) then Text_Io.Put_Line ("tableau plein !!"); else Text_Io.Put ("ajouter Item : "); -- Text_Io.Get; T.Add_Item (Tab, N); end if; T.Dump (Tab); when 's' => Text_Io.Put ("Supprimer Item : "); -- Io.Get (Item => N, Width => 0); T.Rem_Item (Tab, N); T.Dump (Tab); when 'm' => Text_Io.Put ("modifier Item : "); -- Io.Get (Item => N, Width => 0); Text_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' => Text_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=26 rec1=00 rec2=01 rec3=04c [0x01] rec0=16 rec1=00 rec2=03 rec3=054 [0x02] rec0=17 rec1=00 rec2=02 rec3=000 [0x03] rec0=04 rec1=9e rec2=01 rec3=442 tail 0x2154a4df0877234026359 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 00 03 aa 80 03 61 67 65 03 00 4d 20 20 20 20 ┆ age M ┆