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 - downloadIndex: ┃ B T ┃
Length: 3788 (0xecc) Types: TextFile Names: »B«
└─⟦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⟧
with Expertsystem; use Expertsystem; package body Robot_New is Current_Box_Number : Tbox := 1; type Struct_Robot is record His_Name : Tname; His_Box : Tbox; His_Task : Ttask; Is_Occupied : Boolean := False; end record; package Behavior is new Classbehavior (Struct_Robot, "ROBOTS ", 10); ------------------------------------------------------------------------------ function All_Robots return Collection.Object is begin return Behavior.Instances; end All_Robots; ------------------------------------------------------------------------------ function Is_The_Task (Of_Robot : Robot_New.Object; The_Task : Ttask) return Boolean is begin return Behavior.Get (Of_Robot).His_Task = The_Task; end Is_The_Task; ------------------------------------------------------------------------------ function Is_Occupied (The_Robot : Robot_New.Object) return Boolean is begin return Behavior.Get (The_Robot).Is_Occupied; end Is_Occupied; ------------------------------------------------------------------------------ function Name (Of_Robot : Robot_New.Object) return Tname is begin return Behavior.Get (Of_Robot).His_Name; end Name; ------------------------------------------------------------------------------ function Box_Number (Of_Robot : Robot_New.Object) return Tbox is begin return Behavior.Get (Of_Robot).His_Box; end Box_Number; ------------------------------------------------------------------------------ function Last_Box return Tbox is begin Current_Box_Number := Current_Box_Number + 1; return Current_Box_Number - 1; end Last_Box; ------------------------------------------------------------------------------ procedure Modify (The_Robot : Robot_New.Object; The_Occupation : Boolean) is A_Robot : Struct_Robot; begin A_Robot := Behavior.Get (The_Robot); A_Robot.Is_Occupied := The_Occupation; Behavior.Set (The_Robot, A_Robot); end Modify; ------------------------------------------------------------------------------ procedure Modify (The_Robot : Robot_New.Object; The_Task : Ttask) is A_Robot : Struct_Robot; begin A_Robot := Behavior.Get (The_Robot); A_Robot.His_Task := The_Task; Behavior.Set (The_Robot, A_Robot); end Modify; ------------------------------------------------------------------------------ procedure Modify (The_Robot : Robot_New.Object; The_Box : Tbox) is A_Robot : Struct_Robot; begin A_Robot := Behavior.Get (The_Robot); A_Robot.His_Box := The_Box; Behavior.Set (The_Robot, A_Robot); end Modify; ------------------------------------------------------------------------------ procedure Suicide (Of_Robot : Robot_New.Object) is begin Behavior.Dispose (Of_Robot); end Suicide; ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ procedure Create is begin Behavior.Allocate (Struct_Robot'("Robot No 1", 1, Prendre, False)); Behavior.Allocate (Struct_Robot'("Robot No 2", 1, Prendre, False)); Put (" Nb robots : "); Put (Behavior.Cardinality); Put_Line (" "); end Create; end Robot_New; ------------------------------------------------------------------------------- -- DESCRIPTION DES REGLES -- -------------------------------------------------------------------------------