DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦1c1b1e54d⟧ TextFile

    Length: 1201 (0x4b1)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
with Binary_Tree;  
with Bounded_String;

procedure Test_Tree is

    Lexeme_Size : constant Positive := 80;
    subtype Lexeme is Bounded_String.Variable_String (Lexeme_Size);

    procedure Handle (The_Element : in Lexeme) is
    begin
        Text_Io.Put_Line (Bounded_String.Image (The_Element));
    end Handle;

    function Less_Than (Left, Right : Lexeme) return Boolean is
    begin
        if Bounded_String.Image (Left) < Bounded_String.Image (Right) then
            return True;
        else
            return False;
        end if;
    end Less_Than;

    package Tree is new Binary_Tree  
                           (Element => Lexeme, "<" => Less_Than);


    procedure Test is  
        Root_1, Root_2 : Tree.Object;
    begin
        Tree.Clear_Out (Root_1);
        Tree.Clear_Out (Root_2);

        Tree.Insert (Bounded_String.Value ("<", Lexeme_Size), Root_1);
        Tree.Insert (Bounded_String.Value ("expr1", Lexeme_Size), Root_1);
        Tree.Insert (Bounded_String.Value ("expr2", Lexeme_Size), Root_1);
        Tree.Insert (Bounded_String.Value ("28723", Lexeme_Size), Root_1);
        Tree.Visit_Lrr (Root_1);
    end Test;


begin
    Test;
end Test_Tree;