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 - metrics - download
Index: B T

⟦3f0c6203e⟧ TextFile

    Length: 1003 (0x3eb)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

procedure Generic_List_Sorter (List : in out Element_List) is
    type Node;
    type Tree is access Node;
    type Node is
        record  
            Info : Element;
            Left, Right : Tree;
        end record;  
    Root : Tree;
    procedure Place (Item : Element; Where : in out Tree) is
    begin
        if Where = null then
            Where := new Node'(Info => Item, Left | Right => null);
        elsif Where.Info <= Item then
            Place (Item, Where.Right);
        else
            Place (Item, Where.Left);
        end if;
    end Place;  
    procedure Traverse (T : Tree) is
    begin
        if T = null then
            return;
        else
            Traverse (T.Left);
            Append (T.Info, List);
            Traverse (T.Right);
        end if;
    end Traverse;
begin  
    Reset (List);
    while not Done (List) loop
        Place (Value (List), Root);
        Next (List);
    end loop;  
    List := Nil_List;
    Traverse (Root);
end Generic_List_Sorter;