|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 2174 (0x87e) Types: TextFile Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦e96ba9ff0⟧ └─⟦this⟧
with T_Tree, Text_Io ,bounded_String; use bounded_string; procedure Main is type verbe is record Action:Variable_String (32); Syno :Variable_String (32); end record; function Compare (A, B : verbe) return integer; procedure Copie (D : in out verbe; S : verbe); procedure Write (D : verbe); package Arbre is new T_Tree (verbe,Compare,Copie, Write); Data : verbe; Racine,Trouve : Arbre.Ttree; function Compare (A, B : verbe) return integer is begin if image(A.action) < image(B.action) then return arbre.INF; elsif image(A.action) = image(B.action) then return arbre.EQU; else return arbre.SUP; end if; end Compare; procedure Copie (D : in out verbe; S : verbe) is begin free(D.Action); free(D.syno); copy(D.Action,image(S.Action)); copy(D.syno ,image(S.syno)); end Copie; procedure Write (D : verbe) is begin Text_Io.Put_Line ("Action->"&image(D.Action) &" Syno ->" & image(D.syno)); end Write; begin Arbre.Create (Racine); free(Data.action); free(Data.syno); Copy(Data.action,"seb"); Copy(Data.syno, "dit_le_67"); Arbre.Insert(Data,Racine); free(Data.action); free(Data.syno); Copy(Data.action,"bouli"); Copy(Data.syno, "dit_pizza"); Arbre.Insert(Data,Racine); free(Data.action); free(Data.syno); Copy(Data.action,"thierry"); Copy(Data.syno, "dit_papi"); Arbre.Insert(Data,Racine); Arbre.Search(Data,Racine,trouve); if not arbre.Empty(trouve) then free(Data.action); free(Data.syno); Copy(Data.action,"les autres"); Copy(Data.syno, "dit_les_noeux_noeux"); Arbre.Insert(Data,Racine); end if; Arbre.Dump(Racine); Text_Io.new_line; Text_Io.new_line; Text_Io.new_line; if not arbre.Empty(trouve) then free(Data.action); free(Data.syno); Copy(Data.action,"thierry"); Copy(Data.syno, "dit_la_classe"); Arbre.Put(data,Trouve); end if; Arbre.Dump(Racine); end Main