DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦72fab7608⟧ TextFile

    Length: 2076 (0x81c)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

with Expertsystem;
use Expertsystem;

with Ball, Box, Sticker;

package body Balls_Boxes_Stickers_Actions is
    procedure Pack_It_Action (The_Tuple : Tuple.Object) is
        A_Ball    : Ball.Object;
        A_Box     : Box.Object;
        A_Sticker : Sticker.Object;
    begin  
        A_Ball    := Tuple.First (The_Tuple);
        A_Box     := Tuple.Second (The_Tuple);
        A_Sticker := Tuple.Third (The_Tuple);
        Ball.Change (A_Ball, With_Place => Ball.Is_In_Box);
        Box.Change (A_Box, With_State => Box.Is_Full);
        Sticker.Change (A_Sticker, With_State => Sticker.Is_Used);
        Put_Line ("Rule PACK_IT : ball (" &
                  Ball.Colors'Image (Ball.Color (A_Ball)) & "/" &
                  Natural'Image (Ball.Size (A_Ball)) & ") in box (" &
                  Natural'Image (Box.Size (A_Box)) & ")");
    end Pack_It_Action;


    procedure Sticker_Lack_Action (The_Tuple : Tuple.Object) is
        A_Ball : Ball.Object;
    begin
        A_Ball := Tuple.First (The_Tuple);
        Ball.Change (A_Ball, With_Place => Ball.Is_In_Box);
        Put_Line ("Rule STICKER_LACK : there are no stickers left with color " &
                  Ball.Colors'Image (Ball.Color (A_Ball)));
    end Sticker_Lack_Action;


    procedure Box_Lack_Action (The_Tuple : Tuple.Object) is
        A_Ball : Ball.Object;
    begin
        A_Ball := Tuple.First (The_Tuple);
        Ball.Change (A_Ball, With_Place => Ball.Is_In_Box);
        Put_Line
           ("Rule BOX_LACK : there are no boxes left with size greater then " &
            Natural'Image (Ball.Size (A_Ball)));
    end Box_Lack_Action;


    procedure Too_Big_Action (The_Tuple : Tuple.Object) is
        A_Ball : Ball.Object;
    begin
        A_Ball := Tuple.First (The_Tuple);
        Ball.Change (A_Ball, With_Place => Ball.Is_In_Box);
        Put_Line ("Rule TOO_BIG : the " &
                  Ball.Colors'Image (Ball.Color (A_Ball)) & " ball with size " &
                  Natural'Image (Ball.Size (A_Ball)) & " is too BIG");
    end Too_Big_Action;

end Balls_Boxes_Stickers_Actions;