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: ┃ M T ┃
Length: 2712 (0xa98) Types: TextFile Names: »MONKEY_B«
└─⟦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 physicalObject; package body monkey is package behaviour is new classBehavior(object,"MONKEY "); procedure make (is_at : coordinate; on : physical_object := (others=>' '); holds : physical_object := (others=>' ')) is the_monkey : monkey.object; begin the_monkey.is_at := is_at; the_monkey.on := on; the_monkey.holds := holds; if the_monkey.on /= floor then declare obj : reference; function same_at_value(an_object : reference) return boolean is begin return physicalObject.name(an_object) = the_monkey.on and then physicalObject.is_at(an_object) = the_monkey.is_at; end same_at_value; function find_an_object is new collection.findOne(same_at_value); begin obj := find_an_object(physicalObject.instances); if collection.isNull(obj) then raise illegal_make; end if; end; end if; behaviour.allocate(the_monkey); end make; function is_at (the_reference : in expertSystem.reference) return coordinate is begin return behaviour.get(the_reference).is_at; end is_at; function is_on (the_reference : in expertSystem.reference) return physical_object is begin return behaviour.get(the_reference).on; end is_on; function holds (the_reference : in expertSystem.reference) return physical_object is begin return behaviour.get(the_reference).holds; end holds; procedure modify_coordinate (the_reference : in expertSystem.reference; new_coordinate : in coordinate) is the_object : object; begin the_object := behaviour.get(the_reference); the_object.is_at := new_coordinate; behaviour.set(the_reference, the_object); end modify_coordinate; procedure modify_is_on (the_reference : in expertSystem.reference; new_object : in physical_object) is the_object : object; begin the_object := behaviour.get(the_reference); the_object.on := new_object; behaviour.set(the_reference, the_object); end modify_is_on; procedure modify_object_held (the_reference : in expertSystem.reference; new_object : in physical_object) is the_object : object; begin the_object := behaviour.get(the_reference); the_object.holds := new_object; behaviour.set(the_reference, the_object); end modify_object_held; function instances return collection.object is begin return behaviour.instances; end instances; procedure clear is begin behaviour.clear; end clear; end monkey;