|
|
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: 2713 (0xa99)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
separate (Semantique)
package body Verif_Actions is
function Donne_Indice_Tableau_Actions
(Un_Type, Une_Action : Standard_String.Object) return Integer is
begin
for I in 1 .. (Nombre_Actions) loop
if (Standard_String.Equal
(Tableau_Actions (I).Le_Type, Un_Type)) and then
(Standard_String.Equal
(Tableau_Actions (I).L_Action, Une_Action)) then
return I;
end if;
end loop;
end Donne_Indice_Tableau_Actions;
function Donne_Indice_Tableau_Acteurs
(Un_Type, Un_Acteur : Standard_String.Object) return Integer is
begin
for I in 1 .. (Nombre_Actions) loop
if (Standard_String.Equal
(Tableau_Acteurs (I).Le_Type, Un_Type)) and then
(Standard_String.Equal
(Tableau_Acteurs (I).L_Acteur, Un_Acteur)) then
return I;
end if;
end loop;
end Donne_Indice_Tableau_Acteurs;
function Action_Possible
(Une_Action : Standard_String.Object;
Un_Acteur : Standard_String.Object;
De, Vers, En : Lexical.Token := L_Unk) return Boolean is
Indice_Courant : Integer := 0;
Le_Type : Standard_String.Object;
begin
if Acteurs.Acteur_Existe (Un_Acteur) then
Standard_String.Copy
(From => Acteurs.Donne_Type_Acteur (Un_Acteur), To => Le_Type);
if Materiels.Action_Existe (Un_Type => Le_Type,
Une_Action => Une_Action) then
Indice_Courant := Donne_Indice_Tableau_Actions
(Le_Type, Une_Action);
if En = L_Ok then
return Tableau_Actions (Indice_Courant).En = L_Ok;
elsif Vers = L_Ok then
return Tableau_Actions (Indice_Courant).Vers = L_Ok;
elsif De = L_Ok then
return Tableau_Actions (Indice_Courant).De = L_Ok;
else
return True;
end if;
else
Erreurs.Ajouter
("L'action '" & Standard_String.Get_Contents (Une_Action) &
"' n'existe pas pour l'acteur '" &
Standard_String.Get_Contents (Un_Acteur) & "'.");
end if;
else
Erreurs.Ajouter ("L' acteur '" &
Standard_String.Get_Contents (Un_Acteur) &
"' n'existe pas...");
end if;
return False;
end Action_Possible;
end Verif_Actions;