DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d00b41838⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Boolean_Class, seg_0377d7, seg_038f29, seg_038f77

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io;
with Object;
with Error_Broadcaster;
with Bounded_String;
with String_Utilities;
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 String is
        Message : Unary_Message;
        Obj : Object.Reference;
    begin
        Message := Unary_Message'Value (Bounded_String.Image (The_Message));
        Obj := To_Object;
        case Message is
            when Non =>

                return ("");

            when Entexte =>  
                if To_Object.Identity = 0 then
                    return ("faux");
                else
                    if To_Object.Identity = 1 then
                        return ("vrai");
                    end if;
                end if;
        end case;

    end Send;


    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 (Bounded_String.Image (The_Message));
        Obj := To_Object;
        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;
    exception
        when Constraint_Error =>
            raise Error_Broadcaster.Unknown_Unary_Message;
    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 (Bounded_String.Image (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) / 2 +
                      (To_Object.Identity + The_Argument.Identity) mod 2;
                Obj.Class := Object.Tiny_Boolean;
        end case;
        return Obj;
    exception
        when Constraint_Error =>
            raise Error_Broadcaster.Boolean_Bad_Type;
    end Send;

    function Send (To_Object : Object.Reference;
                   The_Argument : Object.Parameters.List)
                  return Object.Reference is

        Obj : Object.Reference;
        Local_Argument : Object.Parameters.List := The_Argument;
        The_Message : Object.Message;
    begin
        Bounded_String.Copy (The_Message, "valeur");
        if (String_Utilities.Equal
               (Bounded_String.Image
                   (Object.Parameters.Selector (Local_Argument)),
                "siVrai:", True)) then
            if (To_Object.Identity = 1) then
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));
            else
                return Object.Void_Reference;
            end if;

        elsif (String_Utilities.Equal
                  (Bounded_String.Image
                      (Object.Parameters.Selector (Local_Argument)),
                   "siFaux:", True)) then
            if (To_Object.Identity = 0) then
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));
            else
                return Object.Void_Reference;
            end if;

        elsif String_Utilities.Equal
                 (Bounded_String.Image
                     (Object.Parameters.Selector (Local_Argument)),
                  "siVrai:siFaux:", True) then  
            if (To_Object.Identity = 1) then
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));
            elsif (To_Object.Identity = 0) then
                Object.Parameters.Get (Local_Argument, Obj);
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));


            end if;

        elsif String_Utilities.Equal
                 (Bounded_String.Image
                     (Object.Parameters.Selector (Local_Argument)),
                  "siFaux:siVrai:", True) then
            if (To_Object.Identity = 0) then
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));
            elsif (To_Object.Identity = 1) then
                Object.Parameters.Get (Local_Argument, Obj);
                Object.Parameters.Get (Local_Argument, Obj);
                return (Object.Send (Obj, The_Message));
            end if;
        else
            raise Error_Broadcaster.Unknown_Keyword_Message;
        end if;

    end Send;

end Boolean_Class;

E3 Meta Data

    nblk1=7
    nid=5
    hdr6=c
        [0x00] rec0=24 rec1=00 rec2=01 rec3=06c
        [0x01] rec0=1b rec1=00 rec2=04 rec3=072
        [0x02] rec0=1b rec1=00 rec2=06 rec3=02e
        [0x03] rec0=17 rec1=00 rec2=03 rec3=046
        [0x04] rec0=18 rec1=00 rec2=07 rec3=044
        [0x05] rec0=0d rec1=00 rec2=02 rec3=001
        [0x06] rec0=38 rec1=40 rec2=00 rec3=020
    tail 0x21530bb9684e493408e3d 0x42a00088462060003
Free Block Chain:
  0x5: 0000  00 00 01 a2 80 10 2c 20 54 68 65 5f 4d 65 73 73  ┆      , The_Mess┆