DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦078243c83⟧ Ada Source

    Length: 45056 (0xb000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Consult_Structure, seg_049995, seg_049e44

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Nos_Listes;
with Structure_Des_Variables;
with Nos_Listes;
use Structure_Des_Variables;

package body Consult_Structure is

    procedure Copy_Type_Direction
                 (Target : in out Type_Direction; Source : Type_Direction) is
    begin
        Nos_Chaines.Copy (Target.Direction, Source.Direction);
        Target.Communication := Source.Communication;
    end Copy_Type_Direction;

    ---------------------------------------------------------------
    --|
    --| Renvoie le type d'une variable. Si cette variable n'existe
    --| pas, la routine renverra le type 'Sans_Type'.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Consult_Type
                (Nom_Variable : Nos_Chaines.String_Text) return Enum_Type is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            return Variable_De_Recherche.Type_Variable;
        else
            return Sans_Type;
        end if;
    end Consult_Type;

    ---------------------------------------------------------------
    --|
    --| Renvoie la valeur d'une variable de type compteur.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Consult_Valeur
                (Nom_Variable : Nos_Chaines.String_Text) return Integer is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);  
        if Trouve then
            if (Variable_De_Recherche.Type_Variable = Compteur) then
                return Variable_De_Recherche.Specif.Valeur_Compteur;
            end if;
        end if;
    end Consult_Valeur;

    ---------------------------------------------------------------
    --|
    --| Renvoie la signification d'une variable de type
    --| Preposition ou Verbe.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Consult_Signification (Nom_Variable : Nos_Chaines.String_Text)
                                   return Nos_Chaines.String_Text is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            case Variable_De_Recherche.Type_Variable is
                when Verbe | Preposition =>
                    return Variable_De_Recherche.Specif.Signification;  
                when others =>
                    null;
            end case;
        end if;
    end Consult_Signification;

    ---------------------------------------------------------------
    --|
    --| Recherche si un Etat donne appartient bien a une
    --| variable donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|   Etat : l'etat recherche
    --|          (type Nos_Chaines.String_Text)
    --|   Sens : le sens concerne par la recherche (utile dans le
    --|          cas d'une communication)
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Etat_Belong_To (Nom_Variable : Nos_Chaines.String_Text;
                             Etat : Nos_Chaines.String_Text;
                             Sens : Enum_Sens) return Boolean is  
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            case Variable_De_Recherche.Type_Variable is
                when Communication =>
                    case Sens is
                        when Sens1 =>
                            return Liste_Etat.Found
                                      (Variable_De_Recherche.Specif.
                                       Sens1.Etat_Communication, Etat);
                        when Sens2 =>
                            return Liste_Etat.Found
                                      (Variable_De_Recherche.Specif.
                                       Sens2.Etat_Communication, Etat);
                        when Les_Deux_Sens =>
                            return (Liste_Etat.Found
                                       (Variable_De_Recherche.Specif.
                                        Sens1.Etat_Communication, Etat) and
                                    Liste_Etat.Found
                                       (Variable_De_Recherche.Specif.
                                        Sens2.Etat_Communication, Etat));
                        when others =>
                            return False;
                    end case;  
                when Lieu =>
                    return Liste_Etat.Found
                              (Variable_De_Recherche.Specif.Etat_Lieu, Etat);
                when Objet =>
                    return Liste_Etat.Found
                              (Variable_De_Recherche.Specif.Etat_Objet, Etat);
                when Personnage =>
                    return
                       Liste_Etat.Found
                          (Variable_De_Recherche.Specif.Etat_Personnage, Etat);
                when others =>
                    return False;
            end case;
        else
            return False;
        end if;
    end Etat_Belong_To;

    ---------------------------------------------------------------
    --|
    --| Recherche si un objet fait bien partie des possessions d'une
    --| variable de type Personnage donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|   Possession : l'objet recherche
    --|                (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Possession_Belong_To
                (Nom_Variable : Nos_Chaines.String_Text;
                 Possession : Nos_Chaines.String_Text) return Boolean is
        Trouve : Boolean;
        Variable_De_Recherche, Le_Objet : Cellule;
        La_Possession : P_Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            Le_Objet.Nom := Possession;
            Structure_Des_Variables.Find (Le_Objet, Trouve);
            if Trouve then
                La_Possession := new Cellule;
                La_Possession.all := Le_Objet;

                case Variable_De_Recherche.Type_Variable is
                    when Personnage =>
                        return Liste_Possession.Found
                                  (Variable_De_Recherche.Specif.
                                   Possession_Personnage, La_Possession);
                    when others =>
                        return False;
                end case;
            else
                return False;
            end if;
        else
            return False;
        end if;
    end Possession_Belong_To;

    ---------------------------------------------------------------
    --|
    --| Recherche si un objet fait bien partie du contenu d'une
    --| variable de type Objet donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|   Contenu : l'objet recherche
    --|             (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Contenu_Belong_To
                (Nom_Variable : Nos_Chaines.String_Text;
                 Contenu : Nos_Chaines.String_Text) return Boolean is
        Trouve : Boolean;
        Variable_De_Recherche, Le_Objet : Cellule;
        Le_Contenu : P_Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            Le_Objet.Nom := Contenu;
            Structure_Des_Variables.Find (Le_Objet, Trouve);
            if Trouve then
                Le_Contenu := new Cellule;
                Le_Contenu.all := Le_Objet;
                case Variable_De_Recherche.Type_Variable is
                    when Objet =>
                        return Liste_Contenu.Found
                                  (Variable_De_Recherche.Specif.Contenu_Objet,
                                   Le_Contenu);
                    when others =>
                        return False;
                end case;
            else
                return False;
            end if;
        else
            return False;
        end if;
    end Contenu_Belong_To;

    ---------------------------------------------------------------
    --|
    --| Renvoie la Description d'une variable donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable
    --|                  (type Nos_Chaines.String_Text)
    --|   Sens : le sens concerne par la recherche (utile dans le
    --|          cas d'une communication)
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Consult_Description (Nom_Variable : Nos_Chaines.String_Text;
                                  Sens : Structure_Des_Variables.Enum_Sens)
                                 return Nos_Chaines.String_Text is  
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);  
        if Trouve then
            case Variable_De_Recherche.Type_Variable is
                when Communication =>
                    case Sens is
                        when Sens1 | Les_Deux_Sens =>
                            return Variable_De_Recherche.Specif.Sens1.
                                      Description_Communication;
                        when Sens2 =>
                            return Variable_De_Recherche.Specif.Sens2.
                                      Description_Communication;
                        when others =>
                            null;
                    end case;
                when Lieu =>
                    return Variable_De_Recherche.Specif.Description_Lieu;
                when Objet =>
                    return Variable_De_Recherche.Specif.Description_Objet;
                when Personnage =>
                    return Variable_De_Recherche.Specif.Description_Personnage;
                when others =>
                    null;
            end case;
        end if;
    end Consult_Description;

    ---------------------------------------------------------------
    --|
    --| Renvoie la valeur du champ Existence d'une variable donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Consult_Existence
                (Nom_Variable : Nos_Chaines.String_Text) return Boolean is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            return Variable_De_Recherche.Existe;
        else
            return False;
        end if;
    end Consult_Existence;

    ---------------------------------------------------------------
    --|
    --| Verifie qu'une variable a bien ete declaree.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Is_In_Structure
                (Nom_Variable : Nos_Chaines.String_Text) return Boolean is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            return True;
        else
            return False;
        end if;
    end Is_In_Structure;

    ---------------------------------------------------------------
    --|
    --| Renvoie la valeur du champ Position d'une variable donnee.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    function Consult_Position (Nom_Variable : Nos_Chaines.String_Text)
                              return Nos_Chaines.String_Text is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then  
            case Variable_De_Recherche.Type_Variable is
                when Objet =>
                    return Consult_Position (Variable_De_Recherche.
                                             Specif.Position_Objet.Nom);
                when Personnage =>
                    return Consult_Position (Variable_De_Recherche.Specif.
                                             Position_Personnage.Nom);  
                when Lieu =>
                    return Variable_De_Recherche.Nom;
                when others =>
                    null;
            end case;
        else
            return Nos_Chaines.Infinite_String.Value (" ");
        end if;
    end Consult_Position;

    ---------------------------------------------------------------
    --|
    --| Renvoie la valeur du champ Source d'une variable de type
    --| Communication.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|   Sens : le sens concerne par la recherche
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Consult_Source
                (Nom_Variable : Nos_Chaines.String_Text; Sens : Enum_Sens)
                return Nos_Chaines.String_Text is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            case Variable_De_Recherche.Type_Variable is
                when Communication =>
                    case Sens is
                        when Sens1 =>
                            return Variable_De_Recherche.
                                      Specif.Sens1.Source.Nom;
                        when Sens2 =>
                            return Variable_De_Recherche.
                                      Specif.Sens2.Source.Nom;  
                        when others =>
                            null;
                    end case;
                when others =>
                    null;
            end case;
        end if;
    end Consult_Source;

    ---------------------------------------------------------------
    --|
    --| Renvoie la valeur du champ Source d'une variable de type
    --| Communication.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nom de la variable sur laquelle porte la
    --|                  recherche.
    --|                  (type Nos_Chaines.String_Text)
    --|   Sens : le sens concerne par la recherche
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Consult_Destination
                (Nom_Variable : Nos_Chaines.String_Text; Sens : Enum_Sens)
                return Nos_Chaines.String_Text is
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Nom_Variable);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            case Variable_De_Recherche.Type_Variable is
                when Communication =>
                    case Sens is
                        when Sens1 =>
                            return Variable_De_Recherche.Specif.
                                      Sens1.Destination.Nom;
                        when Sens2 =>
                            return  
                               Variable_De_Recherche.Specif.
                                  Sens2.Destination.Nom;
                        when others =>
                            null;
                    end case;
                when others =>
                    null;
            end case;
        end if;
    end Consult_Destination;

    ---------------------------------------------------------------
    --|
    --| Compare les etats  de deux variables de meme type.
    --|
    --| Parametres d'entree :
    --|   Variable1 : nom de la premiere variable.
    --|              (type cellule)
    --|   Variable2 : nom de la deuxieme variable.
    --|              (type cellule)
    --|   Sens : le sens concerne pour la comparaison des etats
    --|          d'une communication.
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Compare_Etat (Variable1, Variable2 : Cellule; Sens : Enum_Sens)
                          return Boolean is
        Resultat : Boolean;
    begin
        case Variable1.Type_Variable is
            when Communication =>
                case Sens is
                    when Sens1 =>
                        Resultat := Liste_Etat.Compare (Variable1.Specif.Sens1.
                                                        Etat_Communication,
                                                        Variable2.Specif.Sens1.
                                                           Etat_Communication);
                    when Sens2 =>
                        Resultat := Liste_Etat.Compare (Variable1.Specif.Sens2.
                                                        Etat_Communication,
                                                        Variable2.Specif.Sens2.
                                                           Etat_Communication);
                    when Les_Deux_Sens =>
                        Resultat := ((Liste_Etat.Compare
                                         (Variable1.Specif.Sens1.
                                          Etat_Communication,
                                          Variable2.Specif.Sens1.
                                             Etat_Communication)) and
                                     (Liste_Etat.Compare
                                         (Variable1.Specif.Sens1.
                                          Etat_Communication,
                                          Variable2.Specif.Sens1.
                                             Etat_Communication)));
                    when others =>
                        Resultat := False;
                end case;
            when Lieu =>
                Resultat := Liste_Etat.Compare (Variable1.Specif.Etat_Lieu,
                                                Variable2.Specif.Etat_Lieu);
            when Objet =>
                Resultat := Liste_Etat.Compare (Variable1.Specif.Etat_Objet,
                                                Variable2.Specif.Etat_Objet);
            when Personnage =>
                Resultat := Liste_Etat.Compare
                               (Variable1.Specif.Etat_Personnage,
                                Variable2.Specif.Etat_Personnage);
            when others =>
                Resultat := False;
        end case;
        return Resultat;
    end Compare_Etat;

    ---------------------------------------------------------------
    --|
    --| Compare la position de deux variables de meme type.
    --|
    --| Parametres d'entree :
    --|   Variable1 : nom de la premiere variable.
    --|              (type cellule)
    --|   Variable2 : nom de la deuxieme variable.
    --|              (type cellule)
    --|
    ---------------------------------------------------------------
    function Compare_Position (Variable1, Variable2 : Cellule) return Boolean is
        Resultat : Boolean;
    begin
        case Variable1.Type_Variable is
            when Objet =>
                Resultat := (Nos_Chaines.Equal
                                (Variable1.Specif.Position_Objet.Nom,
                                 Variable2.Specif.Position_Objet.Nom));
            when Personnage =>
                Resultat := (Nos_Chaines.Equal
                                (Variable1.Specif.Position_Personnage.Nom,
                                 Variable2.Specif.Position_Personnage.Nom));
            when others =>
                Resultat := False;
        end case;
        return Resultat;
    end Compare_Position;

    ---------------------------------------------------------------
    --|
    --| Compare deux champs de deux variables de meme type (seules
    --| les comparaisons, des champs qui presente un interet a
    --| etre compares, sont traitees).
    --|
    --| Parametres d'entree :
    --|   Nom_Variable1 : nom de la premiere variable.
    --|                  (type Nos_Chaines.String_Text)
    --|   Nom_Variable2 : nom de la deuxieme variable.
    --|                  (type Nos_Chaines.String_Text)
    --|   Attribut : type du champ a comparer
    --|              (type enum_champ)
    --|   Sens : le sens concerne pour la comparaison des etats
    --|          (type Enum_sens)
    --|
    ---------------------------------------------------------------
    function Compare_Attribut
                (Nom_Variable1, Nom_Variable2 : Nos_Chaines.String_Text;
                 Attribut : Structure_Des_Variables.Enum_Champ;
                 Sens : Structure_Des_Variables.Enum_Sens) return Boolean is
        Resultat, Trouve1, Trouve2 : Boolean;
        Variable_De_Recherche1, Variable_De_Recherche2 : Cellule;
    begin
        Resultat := False;
        Nos_Chaines.Copy (Variable_De_Recherche1.Nom, Nom_Variable1);
        Nos_Chaines.Copy (Variable_De_Recherche2.Nom, Nom_Variable2);
        Structure_Des_Variables.Find (Variable_De_Recherche1, Trouve1);
        Structure_Des_Variables.Find (Variable_De_Recherche2, Trouve2);
        if (Trouve1 and Trouve2) then
            if (Variable_De_Recherche1.Type_Variable =
                (Variable_De_Recherche2.Type_Variable)) then
                case Attribut is
                    when Contenu =>
                        if (Variable_De_Recherche1.Type_Variable = Objet) then
                            Resultat := Liste_Contenu.Compare
                                           (Variable_De_Recherche1.
                                            Specif.Contenu_Objet,
                                            Variable_De_Recherche2.
                                               Specif.Contenu_Objet);
                        end if;
                    when Etat =>
                        Resultat := Compare_Etat (Variable_De_Recherche1,
                                                  Variable_De_Recherche2, Sens);
                    when Position =>
                        Resultat := Compare_Position (Variable_De_Recherche1,
                                                      Variable_De_Recherche2);
                    when Possession =>
                        if (Variable_De_Recherche1.Type_Variable =
                            Personnage) then
                            Resultat := Liste_Possession.Compare
                                           (Variable_De_Recherche1.
                                            Specif.Possession_Personnage,
                                            Variable_De_Recherche2.Specif.
                                               Possession_Personnage);
                        end if;
                    when Valeur =>
                        if (Variable_De_Recherche1.Type_Variable =
                            Compteur) then
                            Resultat := (Variable_De_Recherche1.
                                         Specif.Valeur_Compteur =
                                         Variable_De_Recherche2.
                                            Specif.Valeur_Compteur);
                        end if;

                    when others =>
                        null;
                end case;
            end if;
        end if;  
        return Resultat;
    end Compare_Attribut;

    ---------------------------------------------------------------
    --|
    --|
    ---------------------------------------------------------------
    procedure Consult_Sortie (Le_Lieu : Nos_Chaines.String_Text;
                              La_Destination : in out Nos_Chaines.String_Text;
                              Variable_Communication : Cellule;
                              Le_Sens : in out Integer;
                              Trouve : out Boolean) is
    begin
        if (Variable_Communication.Specif.Sens1.Source /= null) then
            if (Nos_Chaines.Equal
                   (Variable_Communication.Specif.Sens1.Source.Nom,
                    Le_Lieu)) then
                Trouve := True;
                Le_Sens := 1;
                Nos_Chaines.Copy (La_Destination, Variable_Communication.Specif.
                                                     Sens1.Destination.Nom);  
            else
                if (Variable_Communication.Specif.Sens2.Source /= null) then
                    if (Nos_Chaines.Equal
                           (Variable_Communication.Specif.Sens2.Source.Nom,
                            Le_Lieu)) then
                        Trouve := True;
                        Le_Sens := 2;
                        Nos_Chaines.Copy (La_Destination,
                                          Variable_Communication.Specif.
                                             Sens2.Destination.Nom);
                    else
                        Trouve := False;
                        Le_Sens := 0;
                        Nos_Chaines.Copy (La_Destination, "");
                    end if;
                else
                    Trouve := False;
                    Le_Sens := 0;
                    Nos_Chaines.Copy (La_Destination, "");
                end if;
            end if;
        end if;  
        Nos_Chaines.Print_Line (La_Destination);
    end Consult_Sortie;

    ---------------------------------------------------------------
    --|
    --|
    ---------------------------------------------------------------
    procedure Communication_Belong_To_Lieu
                 (Le_Lieu : Nos_Chaines.String_Text;
                  La_Communication : Nos_Chaines.String_Text;
                  La_Destination : in out Nos_Chaines.String_Text;
                  Le_Sens : in out Integer;
                  Trouve : out Boolean) is
        La_Sortie : Type_Direction;
        Found1, Found2, Trouve1, Trouve2 : Boolean;
        Variable_Lieu, Variable_Communication : Cellule;
        Iterateur_Direction : Liste_Direction.Iterateur;  
    begin
        Found1 := False;
        Found2 := False;
        Nos_Chaines.Copy (Variable_Lieu.Nom, Le_Lieu);
        Nos_Chaines.Copy (Variable_Communication.Nom, La_Communication);
        Structure_Des_Variables.Find (Variable_Lieu, Trouve1);
        Structure_Des_Variables.Find (Variable_Communication, Trouve2);
        if (Trouve1 and Trouve2 and (Variable_Lieu.Type_Variable = Lieu) and
            (Variable_Communication.Type_Variable = Communication)) then
            Liste_Direction.First (Iterateur_Direction,
                                   Variable_Lieu.Specif.Direction_Lieu);
            while ((not Found1) and (not Liste_Direction.At_End
                                            (Iterateur_Direction))) loop
                La_Sortie := Liste_Direction.Consult (Iterateur_Direction);
                if (La_Sortie.Communication /= null) then
                    Found1 := Nos_Chaines.Equal (La_Communication,
                                                 La_Sortie.Communication.Nom);
                    if Found1 then
                        Consult_Sortie (Le_Lieu, La_Destination,
                                        Variable_Communication,
                                        Le_Sens, Found2);
                    end if;
                end if;
                Liste_Direction.Next (Iterateur_Direction);
            end loop;
        else
            Le_Sens := 0;
            Nos_Chaines.Copy (La_Destination, "");  
        end if;
        Trouve := (Found1 and Found2);
    end Communication_Belong_To_Lieu;

    ---------------------------------------------------------------
    --|
    --|
    ---------------------------------------------------------------
    procedure Destination_Belong_To_Lieu
                 (Le_Lieu : Nos_Chaines.String_Text;
                  La_Destination : in out Nos_Chaines.String_Text;
                  Le_Sens : in out Integer;
                  Trouve : out Boolean) is
        La_Sortie : Type_Direction;
        Found, Trouve1, Trouve2 : Boolean;
        Variable_Lieu, Variable_Communication : Cellule;
        Iterateur_Direction : Liste_Direction.Iterateur;
    begin
        Found := False;
        Nos_Chaines.Copy (Variable_Lieu.Nom, Le_Lieu);
        Structure_Des_Variables.Find (Variable_Lieu, Trouve1);
        if (Trouve1 and (Variable_Lieu.Type_Variable = Lieu)) then
            Liste_Direction.First (Iterateur_Direction,
                                   Variable_Lieu.Specif.Direction_Lieu);
            while ((not Found) and (not Liste_Direction.At_End
                                           (Iterateur_Direction))) loop
                Copy_Type_Direction (La_Sortie, Liste_Direction.Consult
                                                   (Iterateur_Direction));
                if (La_Sortie.Communication /= null) then
                    Variable_Communication.Nom := La_Sortie.Communication.Nom;
                    Structure_Des_Variables.Find
                       (Variable_Communication, Trouve2);
                    if (Trouve2 and (Variable_Communication.Type_Variable =
                                     Communication)) then
                        if (Variable_Communication.Specif.Sens1.Source /=
                            null) then
                            Nos_Chaines.Print_Line (Variable_Communication.
                                                    Specif.Sens1.Source.Nom);
                            if Nos_Chaines.Equal
                                  (Variable_Communication.
                                   Specif.Sens1.Source.Nom, Le_Lieu) then
                                if Nos_Chaines.Equal
                                      (Variable_Communication.
                                       Specif.Sens1.Destination.Nom,
                                       La_Destination) then
                                    Found := True;
                                    Le_Sens := 1;
                                end if;
                            else
                                if (Variable_Communication.
                                    Specif.Sens2.Source /= null) then
                                    if Nos_Chaines.Equal
                                          (Variable_Communication.
                                           Specif.Sens2.Source.Nom,
                                           Le_Lieu) then
                                        if Nos_Chaines.Equal
                                              (Variable_Communication.
                                               Specif.Sens2.Destination.Nom,
                                               La_Destination) then
                                            Found := True;
                                            Le_Sens := 2;
                                        end if;
                                    end if;
                                end if;
                            end if;
                        else
                            if (Variable_Communication.Specif.Sens2.Source /=
                                null) then
                                if Nos_Chaines.Equal
                                      (Variable_Communication.
                                       Specif.Sens2.Source.Nom, Le_Lieu) then
                                    if Nos_Chaines.Equal
                                          (Variable_Communication.
                                           Specif.Sens2.Destination.Nom,
                                           La_Destination) then
                                        Found := True;
                                        Le_Sens := 2;
                                    end if;
                                end if;
                            end if;
                        end if;
                    end if;
                end if;
                Liste_Direction.Next (Iterateur_Direction);
            end loop;
        end if;
        if not Found then
            Le_Sens := 0;
            Nos_Chaines.Copy (La_Destination, "");
        end if;
        Trouve := Found;
    end Destination_Belong_To_Lieu;

    ---------------------------------------------------------------
    --|
    --|
    ---------------------------------------------------------------
    procedure Direction_Belong_To_Lieu
                 (Le_Lieu : Nos_Chaines.String_Text;
                  La_Direction : Nos_Chaines.String_Text;
                  La_Destination : in out Nos_Chaines.String_Text;
                  Le_Sens : in out Integer;
                  Trouve : out Boolean) is
        La_Sortie : Type_Direction;
        Found, Trouve1, Trouve2 : Boolean;
        Variable_Lieu, Variable_Communication : Cellule;
        Iterateur_Direction : Liste_Direction.Iterateur;
    begin
        Found := False;
        Nos_Chaines.Copy (Variable_Lieu.Nom, Le_Lieu);
        Structure_Des_Variables.Find (Variable_Lieu, Trouve1);
        if (Trouve1 and (Variable_Lieu.Type_Variable = Lieu)) then
            Liste_Direction.First (Iterateur_Direction,
                                   Variable_Lieu.Specif.Direction_Lieu);
            while ((not Found) and (not Liste_Direction.At_End
                                           (Iterateur_Direction))) loop
                Copy_Type_Direction (La_Sortie, Liste_Direction.Consult
                                                   (Iterateur_Direction));
                Nos_Chaines.Print (La_Sortie.Direction);
                Nos_Chaines.Print_Line (La_Sortie.Communication.Nom);
                Found := Nos_Chaines.Equal (La_Direction, La_Sortie.Direction);
                Liste_Direction.Next (Iterateur_Direction);
            end loop;
        end if;
        if (Found and (La_Sortie.Communication /= null)) then  
            Nos_Chaines.Copy (Variable_Communication.Nom,
                              La_Sortie.Communication.Nom);
            Structure_Des_Variables.Find (Variable_Communication, Trouve2);
            if Trouve2 then
                Consult_Sortie (Le_Lieu, La_Destination,
                                Variable_Communication, Le_Sens, Found);
            else
                Le_Sens := 0;
                Nos_Chaines.Copy (La_Destination, "");
            end if;
        else
            Le_Sens := 0;
            Nos_Chaines.Copy (La_Destination, "");
        end if;
        Trouve := Found;
    end Direction_Belong_To_Lieu;



end Consult_Structure;

E3 Meta Data

    nblk1=2b
    nid=26
    hdr6=50
        [0x00] rec0=1c rec1=00 rec2=01 rec3=06a
        [0x01] rec0=1a rec1=00 rec2=02 rec3=03a
        [0x02] rec0=18 rec1=00 rec2=03 rec3=00c
        [0x03] rec0=19 rec1=00 rec2=04 rec3=05e
        [0x04] rec0=13 rec1=00 rec2=29 rec3=002
        [0x05] rec0=11 rec1=00 rec2=06 rec3=00a
        [0x06] rec0=19 rec1=00 rec2=07 rec3=034
        [0x07] rec0=17 rec1=00 rec2=08 rec3=00a
        [0x08] rec0=1b rec1=00 rec2=09 rec3=018
        [0x09] rec0=14 rec1=00 rec2=0a rec3=05e
        [0x0a] rec0=1b rec1=00 rec2=0b rec3=016
        [0x0b] rec0=15 rec1=00 rec2=0c rec3=026
        [0x0c] rec0=19 rec1=00 rec2=0d rec3=008
        [0x0d] rec0=1b rec1=00 rec2=0e rec3=026
        [0x0e] rec0=18 rec1=00 rec2=0f rec3=058
        [0x0f] rec0=18 rec1=00 rec2=10 rec3=064
        [0x10] rec0=16 rec1=00 rec2=11 rec3=036
        [0x11] rec0=1c rec1=00 rec2=12 rec3=012
        [0x12] rec0=18 rec1=00 rec2=13 rec3=03a
        [0x13] rec0=16 rec1=00 rec2=14 rec3=086
        [0x14] rec0=0f rec1=00 rec2=15 rec3=074
        [0x15] rec0=16 rec1=00 rec2=16 rec3=042
        [0x16] rec0=16 rec1=00 rec2=17 rec3=06e
        [0x17] rec0=19 rec1=00 rec2=18 rec3=026
        [0x18] rec0=11 rec1=00 rec2=19 rec3=06a
        [0x19] rec0=11 rec1=00 rec2=1a rec3=008
        [0x1a] rec0=18 rec1=00 rec2=1b rec3=01a
        [0x1b] rec0=12 rec1=00 rec2=1c rec3=042
        [0x1c] rec0=19 rec1=00 rec2=1d rec3=04a
        [0x1d] rec0=0e rec1=00 rec2=1e rec3=00e
        [0x1e] rec0=0e rec1=00 rec2=1f rec3=044
        [0x1f] rec0=19 rec1=00 rec2=20 rec3=034
        [0x20] rec0=11 rec1=00 rec2=21 rec3=048
        [0x21] rec0=10 rec1=00 rec2=22 rec3=044
        [0x22] rec0=05 rec1=00 rec2=23 rec3=06c
        [0x23] rec0=12 rec1=00 rec2=24 rec3=01e
        [0x24] rec0=17 rec1=00 rec2=25 rec3=06e
        [0x25] rec0=15 rec1=00 rec2=2a rec3=042
        [0x26] rec0=11 rec1=00 rec2=27 rec3=01a
        [0x27] rec0=0f rec1=00 rec2=28 rec3=000
        [0x28] rec0=10 rec1=00 rec2=27 rec3=072
        [0x29] rec0=1a rec1=00 rec2=28 rec3=001
        [0x2a] rec0=53 rec1=df rec2=0b rec3=766
    tail 0x21546f502865e6d99bc85 0x42a00088462060003
Free Block Chain:
  0x26: 0000  00 2b 00 50 80 11 65 5f 4c 69 65 75 2c 20 54 72  ┆ + P  e_Lieu, Tr┆
  0x2b: 0000  00 05 00 64 80 1a 20 20 20 20 20 20 69 66 20 4e  ┆   d        if N┆
  0x5: 0000  00 00 03 fc 80 1c 72 69 61 62 6c 65 20 73 75 72  ┆      riable sur┆