|
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: 11264 (0x2c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Verb_Sort_Array, seg_04124f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io, Verb, Generic_String_Sort_Array; use Text_Io; procedure Test_Verb_Sort_Array is package Verb_Array is new Generic_String_Sort_Array (Element => Verb.Object, Max_Element_Number => 200, Null_Element => Verb.Null_Object, Element_Image => Verb.Image, Get_Key => Verb.Name); V1, V2, V3, V4, V5, V6, V7, V8 : Verb.Object; Found : Boolean; An_Array : Verb_Array.Object; An_Iterator : Verb_Array.Iterator; Index : Verb_Array.Element_Index; begin Verb.Put (V1, "marcher", 1); Verb.Put (V2, "aller", 1); Verb.Put (V3, "poser", 2); Verb.Put (V4, "jeter", 2); Verb.Put (V5, "lancer", 2); Verb.Put (V6, "courir", 1); Verb.Put (V7, "sauter", 1); Verb.Put (V8, "deposer", 2); Put_Line ("-- Verb.image --"); Verb.Image (V8); Put_Line ("-- Is_Empty --"); if Verb_Array.Is_Empty (An_Array) then Put_Line ("Le tableau est vide"); end if; Put_Line ("-- Iterateur sur tableau vide --"); Verb_Array.Create (An_Array, An_Iterator); while not Verb_Array.Is_At_End (An_Iterator) loop V1 := Verb_Array.Value (An_Iterator); Verb.Image (V1); Verb_Array.Next (An_Iterator); end loop; Put_Line ("-- verb_Array.Put avec found --"); Verb_Array.Put (An_Array, V1, Found); if Found then Put_Line ("L'element est deja insere !"); end if; Verb_Array.Put (An_Array, V1, Found); if Found then Put_Line ("L'element est deja insere !"); end if; Verb_Array.Put (An_Array, V2, Found); Verb_Array.Put (An_Array, V3, Found); Verb_Array.Put (An_Array, V4, Found); Verb_Array.Put (An_Array, V5, Found); Verb_Array.Put (An_Array, V6, Found); Verb_Array.Put (An_Array, V7, Found); Verb_Array.Put (An_Array, V8, Found); Verb_Array.Create (An_Array, An_Iterator); Put_Line ("-- Iterateur sur tableau plein --"); Verb_Array.Create (An_Array, An_Iterator); while not Verb_Array.Is_At_End (An_Iterator) loop V1 := Verb_Array.Value (An_Iterator); Verb.Image (V1); Verb_Array.Next (An_Iterator); end loop; Put_Line ("-- Put sans found --"); Verb_Array.Put (An_Array, V1); Verb_Array.Create (An_Array, An_Iterator); while not Verb_Array.Is_At_End (An_Iterator) loop V1 := Verb_Array.Value (An_Iterator); Verb.Image (V1); Verb_Array.Next (An_Iterator); end loop; Put_Line ("-- Get avec string --"); Verb_Array.Get (An_Array, V1, "lancer", Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Verb_Array.Get (An_Array, V1, "lance", Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Verb_Array.Get (An_Array, V1, "courir", Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Verb_Array.Get (An_Array, V1, "sauter", Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Put_Line ("-- Get avec Element_Index --"); Verb_Array.Get (An_Array, V1, 1, Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Verb_Array.Get (An_Array, V1, 9, Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Verb_Array.Get (An_Array, V1, 8, Found); if Found then Verb.Image (V1); else Put_Line ("Element pas trouve !"); end if; Put_Line ("-- Index --"); Index := Verb_Array.Index (An_Array, "pose"); if Index /= 0 then Verb_Array.Get (An_Array, V1, Index, Found); Verb.Image (V1); else Put_Line ("Pose pas trouve"); end if; Index := Verb_Array.Index (An_Array, "poser"); if Index /= 0 then Verb_Array.Get (An_Array, V1, Index, Found); Verb.Image (V1); else Put_Line ("Poser pas trouve !"); end if; Put_Line ("-- Verb_array.image --"); Verb_Array.Image (An_Array); end Test_Verb_Sort_Array;
nblk1=a nid=6 hdr6=c [0x00] rec0=21 rec1=00 rec2=01 rec3=010 [0x01] rec0=04 rec1=00 rec2=03 rec3=018 [0x02] rec0=20 rec1=00 rec2=08 rec3=04e [0x03] rec0=24 rec1=00 rec2=05 rec3=012 [0x04] rec0=2a rec1=00 rec2=0a rec3=038 [0x05] rec0=18 rec1=00 rec2=02 rec3=000 [0x06] rec0=21 rec1=00 rec2=03 rec3=034 [0x07] rec0=17 rec1=00 rec2=0a rec3=000 [0x08] rec0=18 rec1=00 rec2=08 rec3=000 [0x09] rec0=2d rec1=0c rec2=14 rec3=72b tail 0x217416c98861352c30ef4 0x42a00088462060003 Free Block Chain: 0x6: 0000 00 09 01 fc 80 1b 62 5f 41 72 72 61 79 2e 4e 65 ┆ b_Array.Ne┆ 0x9: 0000 00 07 03 fc 80 3b 72 62 2e 6e 61 6d 65 20 28 56 ┆ ;rb.name (V┆ 0x7: 0000 00 04 00 2d 80 26 5f 41 72 72 61 79 2e 43 72 65 ┆ - &_Array.Cre┆ 0x4: 0000 00 00 00 06 80 03 6f 6f 70 03 6f 70 06 6f 70 09 ┆ oop op op ┆