DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦6bf4b9099⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Arbres, seg_0456cd

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io, Nos_Arbres, String_Utilities, Test_Arbres_Bis;

procedure Test_Arbres is

    --type Valeur is
    --  record
    --    Chaine : String (1 .. 8);
    --  Int : Integer := 0;
    --end record;
    --function Difference (P, Q : Valeur) return Integer;

    --package Arbre is new Nos_Arbres (Valeur);

    --Un_Arbre : Arbre.Object;
    --Iter : Arbre.Iterator;
    Found : Boolean;
    Search_Valeur, Val_1, Val_2, Val_3, Val_4, Val_5 : Test_Arbres_Bis.Valeur;
    Val1, Val2, Val3, Val4, Val5 : Test_Arbres_Bis.Valeur;
    El, Elem : Test_Arbres_Bis.Valeur;

    --function Differe (X, Y : String) return Integer is
    --begin
    --  if String_Utilities.Less_Than (X, Y) then
    --    return -1;
    --elsif String_Utilities.Less_Than (Y, X) then
    --  return 1;
    --else
    --  return 0;
    --end if;
    --end Differe;

    --function Difference (P, Q : Valeur) return Integer is
    --begin
    --  return Differe (P.Chaine, Q.Chaine);
    --end Difference;

    --use Arbre;

    procedure Search is
    begin
        Test_Arbres_Bis.Find (Search_Valeur, Found);
        if not Found then
            Text_Io.Put_Line ("element non trouve.");
        else
            Text_Io.Put ("element trouve");
            Text_Io.Put_Line (Integer'Image (Search_Valeur.Int));
        end if;

    end Search;


begin
    -- Un_Arbre := Create_Tree;
    Val_1.Chaine := "valeur 1";
    Val_1.Int := 1;
    Val_2.Chaine := "valeur 2";
    Val_2.Int := 2;
    Val_3.Chaine := "valeur 3";
    Val_3.Int := 3;
    Val_4.Chaine := "valeur 4";
    Val_4.Int := 4;
    Val_5.Chaine := "valeur 5";
    Val_5.Int := 5;

    --Add (Val_1, Un_Arbre);
    --Add (Val_2, Un_Arbre);
    --Add (Val_3, Un_Arbre);
    --Add (Val_4, Un_Arbre);
    --Add (Val_5, Un_Arbre);
    Test_Arbres_Bis.Add (Val_1);
    Test_Arbres_Bis.Add (Val_2);
    Test_Arbres_Bis.Add (Val_3);
    Test_Arbres_Bis.Add (Val_4);
    Test_Arbres_Bis.Add (Val_5);
    Text_Io.Put_Line ("ok add");

    Search_Valeur.Chaine := "valeur 1";  
    Search;
    Search_Valeur.Chaine := "valeur 2";
    Search;
    Search_Valeur.Chaine := "valeur 3";
    Search;
    Search_Valeur.Chaine := "valeur 4";
    Search;
    Search_Valeur.Chaine := "valeur 5";
    Search;

    --Find (Search_Valeur,un_arbre,  Found);
    --if not Found then
    --  Text_Io.Put_Line ("element non trouve.");
    --else
    --  Text_Io.Put ("element trouve");
    --Text_Io.Put_Line (Integer'Image (Search_Valeur.Int));
    --end if;

    --Text_Io.Put_Line (Val_3.Chaine);

--    Extract (Un_Arbre, Val1);
--    Text_Io.Put_Line (Val1.Chaine);
--    Extract (Un_Arbre, Val2);
--    Text_Io.Put_Line (Val2.Chaine);
--    Extract (Un_Arbre, Val3);
--    Text_Io.Put_Line (Val3.Chaine);
--    Extract (Un_Arbre, Val4);
--    Text_Io.Put_Line (Val4.Chaine);
--    Extract (Un_Arbre, Val5);
--    Text_Io.Put_Line (Val5.Chaine);
    Text_Io.Put_Line ("iteration !");

--    First_Iteration (Un_Arbre, Iter, Val1);
--    Text_Io.Put_Line (Val1.Chaine);
--    Val1.Chaine := "aaaaaaaa";


    --Iter := Create_Iterator (Un_Arbre);
    --while (not End_Iteration (Iter)) loop
    --  Iterate (Iter, Val1);
    --if Val1.Chaine = "valeur 4" then
    --  Text_Io.Put_Line ("++++++++++++++valeur trouvee : ");
    --else
    --  Text_Io.Put_Line ("valeur non trouvee.");
    --end if;
    --Text_Io.Put_Line (Val1.Chaine);
    --end loop;


    --Iter := Create_Iterator (Un_Arbre);
    --while (not End_Iteration (Iter)) loop
    --  Iterate (Iter, Val1);
    --if Val1.Chaine = "valeur 4" then
    --  Text_Io.Put_Line ("++++++++++++++valeur trouvee : ");
    --else
    --  Text_Io.Put_Line ("valeur non trouvee.");
    --end if;
    --Text_Io.Put_Line (Val1.Chaine);
    --end loop;

exception
    when others =>
        Text_Io.Put_Line ("erreur test_arbre");
end Test_Arbres;

E3 Meta Data

    nblk1=6
    nid=2
    hdr6=a
        [0x00] rec0=23 rec1=00 rec2=01 rec3=03e
        [0x01] rec0=27 rec1=00 rec2=03 rec3=020
        [0x02] rec0=22 rec1=00 rec2=06 rec3=00a
        [0x03] rec0=21 rec1=00 rec2=05 rec3=048
        [0x04] rec0=02 rec1=00 rec2=04 rec3=000
        [0x05] rec0=43 rec1=10 rec2=af rec3=001
    tail 0x21541c1c2864b3b2e9fc5 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 22 00 1f 2d 2d 20 20 20 20 45 78 74 72  ┆   "  --    Extr┆