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

⟦9643898fa⟧ TextFile

    Length: 7474 (0x1d32)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

with Pile;

package body Pile_Controle_Generic is
    package Pile_Enreg_Activ is new Pile (Item => Table_Symbole.Pobject);  
    Stackea : Pile_Enreg_Activ.Object (1000);


    Object_Eff : Table_Symbole.Pobject;

    procedure Modifier (Nom : Ptr_String;
                        Element : in out Pobject;
                        Ok : in out Boolean) is
        E : Table_Symbole.Pobject;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, E);
        Pile_Enreg_Activ.Empiler (Stackea, Element);
    end Modifier;

    procedure Recherche_Si_Parametre_De (Nom : Ptr_String;
                                         Nom_Param : Ptr_String;
                                         Valeur : in out Pobject;
                                         Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;  
        Nbr_Param : Natural := 0;
        Trouve : Boolean := False;
        I : Natural := 1;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Pile_Enreg_Activ.Empiler (Stackea, Element);

        Nbr_Param := Element.Nombre_Parametre;
        while (I <= Nbr_Param) and (not Trouve) loop

            if Nom_Param.all = Element.Parametre (I).Nom.all then
                Trouve := True;
                Ok := True;

                Valeur := Element.Parametre (I);
            end if;
            I := I + 1;
        end loop;
    end Recherche_Si_Parametre_De;

    procedure Lire_Parametre_De (Nom : Ptr_String;
                                 Nom_Param : Ptr_String;
                                 Valeur : in out Pobject;
                                 Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
        Nbr_Param : Natural := 0;
        Trouve : Boolean := False;
        I : Natural := 1;
    begin

        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Pile_Enreg_Activ.Empiler (Stackea, Element);

        Nbr_Param := Element.Nombre_Parametre;
        while (I <= Nbr_Param) and (not Trouve) loop

            if Nom_Param.all = Element.Parametre (I).Nom.all then
                Trouve := True;
                Ok := True;

                Valeur := Element.Parametre (I);
            end if;
            I := I + 1;
        end loop;

    end Lire_Parametre_De;

    procedure Lire_Parametre_De (Nom : Ptr_String;
                                 Num_Param : Natural;
                                 Valeur : in out Pobject;
                                 Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
    begin

        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Pile_Enreg_Activ.Empiler (Stackea, Element);



        if Num_Param <= Element.Nombre_Parametre then
            Valeur := Element.Parametre (Num_Param);
        end if;

    end Lire_Parametre_De;

    procedure Lire_Etiquette_De (Nom : Ptr_String; Etiquette : out Natural) is
        Element : Table_Symbole.Pobject;
    begin

        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Pile_Enreg_Activ.Empiler (Stackea, Element);

        Etiquette := Element.Etiquette;
    end Lire_Etiquette_De;

    procedure Modifier_Parametre_De (Nom : Ptr_String;
                                     Num_Param : Natural;
                                     Valeur : in out Pobject;
                                     Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
        Nbr_Param : Natural := 0;
    begin

        Pile_Enreg_Activ.Depiler (Stackea, Element);

        Nbr_Param := Element.Nombre_Parametre;

        if Num_Param <= Nbr_Param then
            Element.Parametre (Num_Param) := Valeur;
        else
            Ok := False;
        end if;


        Pile_Enreg_Activ.Empiler (Stackea, Element);


    end Modifier_Parametre_De;

    procedure Modifier_Parametre_De (Nom : Ptr_String;
                                     Nom_Param : Ptr_String;
                                     Valeur : in out Pobject;
                                     Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
        Nbr_Param : Natural := 0;
        Trouve : Boolean := False;
        I : Natural := 1;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);

        Nbr_Param := Element.Nombre_Parametre;

        while (I <= Nbr_Param) and (not Trouve) loop

            if Nom_Param.all = Element.Parametre (I).Nom.all then
                Trouve := True;
                Ok := True;

                Element.Parametre (I) := Valeur;
            end if;
            I := I + 1;
        end loop;

        Pile_Enreg_Activ.Empiler (Stackea, Element);

    end Modifier_Parametre_De;

    procedure Lire_Valeur_Retour_De (Nom : Ptr_String;
                                     Valeur : in out Pobject;
                                     Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Valeur := Element.Valeur_Retour;
        Pile_Enreg_Activ.Empiler (Stackea, Element);
    end Lire_Valeur_Retour_De;

    procedure Modifier_Valeur_Retour_De (Nom : Ptr_String;
                                         Valeur : in out Pobject;
                                         Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);
        Element.Valeur_Retour := Valeur;
        Pile_Enreg_Activ.Empiler (Stackea, Element);
    end Modifier_Valeur_Retour_De;





    procedure Dupliquer_Effet
                 (Nom_Effet : Les_Types.Ptr_String;
                  Object_Station_Type : in out Table_Symbole.Pobject;
                  Ok : in out Boolean) is
        Object_Effet : Table_Symbole.Pobject;
    begin

        Table_Symbole.Rechercher (Nom_Effet, Object_Effet, Ok);



        Object_Eff := new Table_Symbole.Object (Effet);
        Object_Eff.Nom := new String'(Nom_Effet.all);
        Object_Eff.Le_Type := Effet;  
        Object_Eff.Nombre_Parametre := Object_Effet.Nombre_Parametre;

        for I in 1 .. Object_Station_Type.Nombre_Parametre loop
            Object_Eff.Parametre (I) :=
               new Object (Object_Effet.Parametre (I).Le_Type);
            Object_Eff.Parametre (I).Nom :=
               new String'(Object_Effet.Parametre (I).Nom.all);
            Object_Eff.Parametre (I).Le_Type :=
               Object_Effet.Parametre (I).Le_Type;
        end loop;

        Object_Eff.L_Arbre_Abstrait := Object_Effet.L_Arbre_Abstrait;
        Object_Eff.Valeur_Retour :=
           new Object (Object_Effet.Valeur_Retour.Le_Type);

    end Dupliquer_Effet;

    procedure Empiler (Nom : Les_Types.Ptr_String; Ok : in out Boolean) is
        Element : Table_Symbole.Pobject;
    begin
        Table_Symbole.Rechercher (Nom, Element, Ok);
        if Ok then
            Dupliquer_Effet (Nom, Element, Ok);
            if Ok then
                Pile_Enreg_Activ.Empiler (Stackea, Object_Eff);
            end if;
        end if;
    end Empiler;

    procedure Empiler (Element : Table_Symbole.Pobject) is
    begin
        Pile_Enreg_Activ.Empiler (Stackea, Element);
    end Empiler;

    function Depiler return Table_Symbole.Pobject is
        Element : Table_Symbole.Pobject;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);
        return Element;
    end Depiler;

    procedure Depiler is
        Element : Table_Symbole.Pobject;
    begin
        Pile_Enreg_Activ.Depiler (Stackea, Element);
    end Depiler;


end Pile_Controle_Generic;