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

⟦db99efdc4⟧ TextFile

    Length: 3094 (0xc16)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Expertsystem;
use Expertsystem;
package body Ne_Robot is
    package Behavior is new Classbehavior (Object, "ROBOTS    ", 10);

    function All_Robots return Collection.Object is
    begin
        return Behavior.Instances;
    end All_Robots;
    --------------------------
    function Anciennete return Integer is
    begin  
        Num_Anc := Num_Anc + 1;
        return Num_Anc;
    end Anciennete;

    --------------------------
    procedure Modifieranc (Unrobot : Reference; Val : Integer) is
        Unrob : Object;
    begin
        Unrob     := Behavior.Get (Unrobot);
        Unrob.Anc := Val;
        Behavior.Set (Unrobot, Unrob);
    end Modifieranc;



    ---------------------------
    function Plus_Ancien (R, Any : Reference) return Boolean is
    begin
        return Behavior.Get (R).Anc < Behavior.Get (Any).Anc;
    end Plus_Ancien;

    function Le_Plus_Ancien is new Collection.Themost (Plus_Ancien);

    function Un_Plus_Ancien_Robot (R : Reference) return Boolean is
    begin
        return Behavior.Get (R).Anc =
                  Behavior.Get (Le_Plus_Ancien (Behavior.Instances)).Anc;
    end Un_Plus_Ancien_Robot;



    --------------------------

    function Peutprendre (R : Reference) return Boolean is
    begin
        return Behavior.Get (R).Tache = Prendre;
    end Peutprendre;

    function Peutdeposer (R : Reference) return Boolean is
    begin
        return Behavior.Get (R).Tache = Deposer;
    end Peutdeposer;

    function Tientbrique (R : Reference) return Boolean is
    begin
        return Behavior.Get (R).Pinceoccupee;
    end Tientbrique;

    function Nom (R : Reference) return Tnom is
    begin
        return Behavior.Get (R).Nom;
    end Nom;

    function Numeroboite (R : Reference) return Tcase is
    begin
        return Behavior.Get (R).Boite;
    end Numeroboite;

    function Derniereboite return Tcase is
    begin
        Numerocourant := Numerocourant + 1;
        return Numerocourant - 1;
    end Derniereboite;

    procedure Creer is
    begin
        Behavior.Allocate (Object'("Robot No 1", 1, Prendre, False, 0));
        Behavior.Allocate (Object'("Robot No 2", 1, Prendre, False, 0));
        Put (" Nb robots : ");
        Put (Behavior.Cardinality);
        Put_Line (" ");
    end Creer;

    procedure Modifierpince (R : Reference; B : Boolean) is
        Unrobot : Object;
    begin
        Unrobot              := Behavior.Get (R);
        Unrobot.Pinceoccupee := B;
        Behavior.Set (R, Unrobot);
    end Modifierpince;

    procedure Modifiertache (R : Reference; A : Ttache) is
        Unrobot : Object;
    begin
        Unrobot       := Behavior.Get (R);
        Unrobot.Tache := A;
        Behavior.Set (R, Unrobot);
    end Modifiertache;

    procedure Modifierboite (R : Reference; C : Tcase) is
        Unrobot : Object;
    begin
        Unrobot       := Behavior.Get (R);
        Unrobot.Boite := C;
        Behavior.Set (R, Unrobot);
    end Modifierboite;

    procedure Sesuicide (R : Reference) is
    begin
        Behavior.Dispose (R);
    end Sesuicide;

end Ne_Robot;