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: 3570 (0xdf2) 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 Brick_New is type Struct_Brick is record His_Size : Tsize := 1; His_Color : Tcolor := Rose; His_Place : Tplace := Tas; His_Box : Tbox; end record; package Behavior is new Classbehavior (Struct_Brick, "BRIQUES "); ------------------------------------------------------------------------------ function All_Bricks return Collection.Object is begin return Behavior.Allinstances; end All_Bricks; ------------------------------------------------------------------------------ function Is_The_Place (Of_Brick : Object; The_Place : Tplace) return Boolean is begin return Behavior.Get (Of_Brick).His_Place = The_Place; end Is_The_Place; ------------------------------------------------------------------------------ function Size (Of_Brick : Object) return Tsize is begin return Behavior.Get (Of_Brick).His_Size; end Size; ------------------------------------------------------------------------------ function Color (Of_Brick : Object) return Tcolor is begin return Behavior.Get (Of_Brick).His_Color; end Color; ------------------------------------------------------------------------------ procedure Create is begin -- for I in 10 .. 30 loop -- Behavior.Allocate (Struct_Brick'(Tsize (I), Rose, Tas, Tbox (1))); -- end loop; Behavior.Allocate (Struct_Brick'(Tsize (100), Grise, Tas, Tbox (1))); Behavior.Allocate (Struct_Brick'(Tsize (200), Blanche, Tas, Tbox (1))); Behavior.Allocate (Struct_Brick'(Tsize (300), Rose, Tas, Tbox (1))); Behavior.Allocate (Struct_Brick'(Tsize (5), Blanche, Tas, Tbox (1))); Behavior.Allocate (Struct_Brick'(Tsize (150), Grise, Tas, Tbox (1))); Behavior.Allocate (Struct_Brick'(Tsize (15), Grise, Tas, Tbox (1))); Put_Line (" "); Put (" Nb briques : "); Put (Behavior.Cardinality); Put_Line (" "); end Create; ------------------------------------------------------------------------------ procedure Modify (The_Brick : Object; The_Place : Tplace) is A_Brick : Struct_Brick; begin A_Brick := Behavior.Get (The_Brick); A_Brick.His_Place := The_Place; Behavior.Set (The_Brick, A_Brick); end Modify; ------------------------------------------------------------------------------ procedure Modify (The_Brick : Object; The_Box : Tbox) is A_Brick : Struct_Brick; begin A_Brick := Behavior.Get (The_Brick); A_Brick.His_Box := The_Box; Behavior.Set (The_Brick, A_Brick); end Modify; ------------------------------------------------------------------------------ function On_Heap (R : Object) return Boolean is begin return Behavior.Get (R).His_Place = Tas; end On_Heap; function Brick_On_Heap is new Collection.Restrict (On_Heap); function Greatest (R, Any : Object) return Boolean is begin return Behavior.Get (R).His_Size > Behavior.Get (Any).His_Size; end Greatest; function The_Greatest is new Collection.Themost (Greatest); function The_Greatest_On_Heap (Brick : Object) return Boolean is begin return Behavior.Get (Brick).His_Size = Behavior.Get (The_Greatest (Brick_On_Heap (Behavior.Instances))). His_Size; end The_Greatest_On_Heap; end Brick_New;