|
|
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: 2063 (0x80f)
Types: TextFile
Names: »B«
└─⟦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⟧
package body Arbre_Abstrait is
function Creer_Noeud (Nom : Constructeur;
Sous_Arbre_Gauche, Sous_Arbre_Droit : in Pnoeud)
return Pnoeud is
T : Pnoeud;
begin
T := new Noeud (Bourgeon);
T.Nom := Nom;
T.Gauche := Sous_Arbre_Gauche;
T.Droit := Sous_Arbre_Droit;
return T;
end Creer_Noeud;
function Creer_Feuille (Nom : Constructeur; E : in Item) return Pnoeud is
T : Pnoeud;
begin
T := new Noeud (Feuille);
T.Nom := Nom;
T.Valeur := E;
return T;
end Creer_Feuille;
function Type_Noeud (Ptr : in Pnoeud) return Le_Type_Du_Noeud is
begin
return Ptr.Le_Type;
end Type_Noeud;
function Constructeur_Noeud (Ptr : in Pnoeud) return Constructeur is
begin
return Ptr.Nom;
end Constructeur_Noeud;
function Valeur_Noeud (Ptr : in Pnoeud) return Item is
begin
return Ptr.Valeur;
end Valeur_Noeud;
function Noeud_Gauche (Ptr : in Pnoeud) return Pnoeud is
begin
return Ptr.Gauche;
end Noeud_Gauche;
function Noeud_Droit (Ptr : in Pnoeud) return Pnoeud is
begin
return Ptr.Droit;
end Noeud_Droit;
function Equivalent (S, T : Pnoeud) return Boolean is
begin
if Type_Noeud (S) = Type_Noeud (T) then
if Type_Noeud (S) = Feuille then
if Constructeur_Noeud (S) = Constructeur_Noeud (T) then
return True;
else
return False;
end if;
else
if Constructeur_Noeud (S) = Constructeur_Noeud (T) then
return Equivalent (Noeud_Gauche (S), Noeud_Gauche (T)) and
Equivalent (Noeud_Droit (S), Noeud_Droit (T));
else
return False;
end if;
end if;
else
return False;
end if;
end Equivalent;
end Arbre_Abstrait;