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

⟦485b10b06⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bbs_Actions, seg_0116b0

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 Slot, Instance, Text_Io;
with Tuple;
with Ball_Features, Box_Features, Sticker_Features;
with New_Ball, New_Box, New_Sticker;
package body Bbs_Actions is
    use Ball_Features, Box_Features, Sticker_Features, Slot.Operators;
    type Col is (Black, Red, Green, Blue, White, Yellow);

    procedure Pack_It_Action (The_Tuple : Tuple.Object) is
        A_Ball    : New_Ball.Object;
        A_Box     : New_Box.Object;
        A_Sticker : New_Sticker.Object;
    begin  
        Tuple.Split (The_Tuple, A_Ball, A_Box, A_Sticker);
        New_Ball.Change (The_Object => A_Ball,
                         Attribute  => Place,
                         To         => In_The_Box);
        New_Box.Change (The_Object => A_Box,
                        Attribute  => State,
                        To         => State_Slot_Box.Value (Is_Full));
        New_Sticker.Change (The_Object => A_Sticker,
                            Attribute  => State,
                            To         => State_Slot_Sticker.Value (Is_Used));

        Text_Io.Put_Line
           ("=>Rule PACK_IT : ball (" &
            Col'Image (Col'Val
                          (Slot.Get (New_Ball.Value_Of (A_Ball, Colour)))) &
            "/" & Slot.Image (New_Ball.Value_Of (A_Ball, Size)) & ") in box (" &
            Slot.Image (New_Box.Value_Of (A_Box, Size)) & ") with label:  " &
            Col'Image (Col'Val (Slot.Get (New_Sticker.Value_Of
                                             (A_Sticker, Colour)))) & "(" &
            State_Slot_Sticker.Image
               (New_Sticker.Value_Of (A_Sticker, State)) & ")");
    end Pack_It_Action;

    ------------------------------------------------------------
    procedure Sticker_Lack_Action (The_Tuple : Tuple.Object) is
        A_Ball : New_Ball.Object;
    begin
        Tuple.Split (The_Tuple, A_Ball);
        New_Ball.Change (The_Object => A_Ball,
                         Attribute  => Place,
                         To         => In_The_Box);
        Text_Io.Put_Line
           ("=>Rule STICKER_LACK : there are no stickers left with color " &
            Col'Image (Col'Val
                          (Slot.Get (New_Ball.Value_Of (A_Ball, Colour)))));
    end Sticker_Lack_Action;

    ------------------------------------------------------------
    procedure Box_Lack_Action (The_Tuple : Tuple.Object) is
        A_Ball : New_Ball.Object;
    begin
        Tuple.Split (The_Tuple, A_Ball);
        New_Ball.Change (The_Object => A_Ball,
                         Attribute  => Place,
                         To         => In_The_Box);
        Text_Io.Put_Line
           ("=>Rule BOX_LACK : there are no boxes left with size greater then " &
            Slot.Image (New_Ball.Value_Of (A_Ball, Size)));
    end Box_Lack_Action;

    ------------------------------------------------------------
    procedure Too_Big_Action (The_Tuple : Tuple.Object) is
        A_Ball : New_Ball.Object;
    begin
        Tuple.Split (The_Tuple, A_Ball);
        New_Ball.Change (The_Object => A_Ball,
                         Attribute  => Place,
                         To         => In_The_Box);
        Text_Io.Put_Line
           ("=>Rule TOO_BIG : the colour " &
            Col'Image (Col'Val
                          (Slot.Get (New_Ball.Value_Of (A_Ball, Colour)))) &
            " ball with size " &
            Slot.Image (New_Ball.Value_Of (A_Ball, Size)) & " is too BIG");
    end Too_Big_Action;

end Bbs_Actions;

E3 Meta Data

    nblk1=6
    nid=4
    hdr6=a
        [0x00] rec0=18 rec1=00 rec2=01 rec3=01c
        [0x01] rec0=15 rec1=00 rec2=06 rec3=008
        [0x02] rec0=00 rec1=00 rec2=03 rec3=010
        [0x03] rec0=16 rec1=00 rec2=05 rec3=02a
        [0x04] rec0=0f rec1=00 rec2=02 rec3=001
        [0x05] rec0=56 rec1=4d rec2=36 rec3=100
    tail 0x2150ceebe823a3d55e310 0x42a00088462063c03
Free Block Chain:
  0x4: 0000  00 00 00 13 80 10 20 20 20 20 20 28 22 3d 3e 52  ┆           ("=>R┆