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

⟦12167594a⟧ TextFile

    Length: 1455 (0x5af)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

separate (Symbol_Table)
package body Symbol_Tree is

    Current_Node : Object;

    function Find (In_The_Object : Object; S : String) return Boolean is
    begin
        if In_The_Object = null then
            return False;
        else
            Current_Node := In_The_Object;
            if Symbol.Name (Current_Node.The_Symbol) = S then
                return True;
            else
                if Symbol.Name (Current_Node.The_Symbol) < S then
                    return Find (Current_Node.Left_Son, S);
                else
                    return Find (Current_Node.Right_Son, S);
                end if;
            end if;
        end if;
    end Find;


    function Make (With_The_String : String; Of_Type : Symbol_Type)
                  return Object is
        Result : Object;
    begin
        Result := new Node;
        Symbol.Set_Name (Result.The_Symbol, With_The_String);
        return Result;
    end Make;


    procedure Insert (To : Object; S : String; Of_Type : Symbol_Type) is
    begin  
        if not Find (To, S) then
            if Symbol.Name (Current_Node.The_Symbol) < S then
                Current_Node.Left_Son := new Node;
                Symbol.Set_Name (Current_Node.Left_Son.The_Symbol, S);
            else
                Current_Node.Right_Son := new Node;
                Symbol.Set_Name (Current_Node.Right_Son.The_Symbol, S);
            end if;
        end if;
    end Insert;


end Symbol_Tree;