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

⟦535e1d8b8⟧ TextFile

    Length: 2242 (0x8c2)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
with Tuple;

with Etat, Nombre, Point;

package body Bench_Actions is

    Max_Point : constant := 30;
    Max_Iter  : constant := 100;

------------------------------------------------------------------------------
    procedure Creation_Objets_Action (The_Tuple : Tuple.Object) is
        Un_Etat   : Etat.Object;
        Un_Nombre : Nombre.Object;
        Un_Point  : Point.Object;
    begin  
        Tuple.Split (The_Tuple, Un_Etat, Un_Nombre);
        Nombre.Change (Un_Nombre, With_Value => Nombre.Value (Un_Nombre) + 1);
        Un_Point := Point.Add (With_X => Nombre.Value (Un_Nombre),
                               With_Y => Nombre.Value (Un_Nombre) * 2);
    end Creation_Objets_Action;


------------------------------------------------------------------------------
    procedure Fin_Creation_Action (The_Tuple : Tuple.Object) is
        Un_Etat : Etat.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat);
        Etat.Change (Un_Etat, With_Value => 1);
    end Fin_Creation_Action;


------------------------------------------------------------------------------
    procedure Recherche_Objet_Action (The_Tuple : Tuple.Object) is
        Un_Etat   : Etat.Object;
        Un_Nombre : Nombre.Object;
        Un_Point  : Point.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat, Un_Nombre, Un_Point);
        Nombre.Change (Un_Nombre, With_Value => Nombre.Value (Un_Nombre) - 1);
        -- Text_Io.Put_Line ("Rule RECHERCHE_OBJET  : point x = " &
        --                 Natural'Image (Point.X (Un_Point)) & " / y = " &
        --                 Natural'Image (Point.Y (Un_Point)));
    end Recherche_Objet_Action;


------------------------------------------------------------------------------
    procedure Iteration_Action (The_Tuple : Tuple.Object) is
        Un_Etat   : Etat.Object;
        Un_Nombre : Nombre.Object;
    begin
        Tuple.Split (The_Tuple, Un_Etat, Un_Nombre);
        Nombre.Change (Un_Nombre, With_Value => Max_Point);
        Etat.Change (Un_Etat, With_Value => Etat.Value (Un_Etat) + 1);
        -- Text_Io.Put_Line ("Rule ITERATION  : FIN   etat = " &
        --                  Natural'Image (Etat.Value (Un_Etat)));
    end Iteration_Action;

end Bench_Actions;