|
|
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 - metrics - downloadIndex: B T
Length: 1575 (0x627)
Types: TextFile
Names: »B«
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Text_Io;
with Object;
package body Boolean_Class is
type Binary_Message is (Et, Ou);
type Unary_Message is (Entexte, Non);
function Send (To_Object : Object.Reference; The_Message : Object.Message)
return Object.Reference is
Message : Unary_Message;
Obj : Object.Reference;
begin
Message := Unary_Message'Value (The_Message);
case Message is
when Non =>
Obj.Identity := (To_Object.Identity + 1) mod 2;
when Entexte =>
if To_Object.Identity = 0 then
Text_Io.Put ("faux");
else
if To_Object.Identity = 1 then
Text_Io.Put ("vrai");
end if;
end if;
end case;
return Obj;
end Send;
function Send (To_Object : Object.Reference;
The_Message : Object.Message;
The_Argument : Object.Reference) return Object.Reference is
Message : Binary_Message;
Obj : Object.Reference;
begin
Message := Binary_Message'Value (The_Message);
case Message is
when Et =>
Obj.Identity := (To_Object.Identity * The_Argument.Identity);
Obj.Class := Object.Tiny_Boolean;
when Ou =>
Obj.Identity :=
(To_Object.Identity + The_Argument.Identity) mod 2;
Obj.Class := Object.Tiny_Boolean;
end case;
return Obj;
end Send;
end Boolean_Class;