|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1003 (0x3eb)
Types: TextFile
Names: »B«
└─⟦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⟧
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;