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: ┃ L T

⟦e7d84d05d⟧ TextFile

    Length: 2006 (0x7d6)
    Types: TextFile
    Names: »L«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Spectacle_Tree;
with Tad_Abstract;
with Text_Io;

package body Codage is
    package Int_Io is new Text_Io.Integer_Io (Natural);

    The_Time : Natural := 1;

    procedure Generer_Code_Activer (Ptr : Tad_Abstract.Pobject) is

    begin
        Int_Io.Put (The_File, The_Time);
        Int_Io.Put (The_File, "  ");
        Int_Io.Put (The_File, Ptr.Left.all.Station);
        Int_Io.Put (The_File, Ptr.Left.all.Acteur);
        Text_Io.Put_Line (" 0001");
    end Generer_Code_Activer;


    procedure Generer_Code_Desactiver (Ptr : Tad_Abstract.Pobject) is

    begin
        Int_Io.Put (The_File, The_Time);
        Text_Io.Put (The_File, "  ");
        Int_Io.Put (The_File, Ptr.Left.all.Station);
        Int_Io.Put (The_File, Ptr.Left.all.Acteur);
        Text_Io.Put_Line (The_File, " 0000");
    end Generer_Code_Desactiver;


    procedure Generer_Code_Au_Temps (Ptr : Tad_Abstract.Pobject) is

    begin
        The_Time := The_Time + Ptr.all.Valeur;
    end Generer_Code_Au_Temps;


    procedure Parcourir (Ptr : Tad_Abstract.Pobject) is
    begin
        if Ptr /= null then
            case Tab_Abstract.Type_Of_Node (Ptr.all) is
                when Chainage =>
                    Parcourir (Ptr.Left);
                    Parcouriri (Ptr.Right);
                when Activer =>
                    Generer_Code_Activer (Ptr);
                when Desactiver =>
                    Generer_Code_Desactiver (Ptr);
                when Au_Temps =>
                    Generer_Code_Au_Temps (Ptr);
                when others =>
                    null;
            end case;
        end if;
    end Parcourir;


    function Generer_Code return String is

    begin
        Text_Io.Create (File => The_File,
                        Mode => Text_Io.Out_File,
                        Name => "fichier_code",
                        Form => "");
        Parcourir (Spectacle_Tree.Object);
        Text_Io.Close (The_File);
        return ("fichier_code");
    end Generer_Code;
end Codage;