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

⟦afbaf2c81⟧ TextFile

    Length: 3148 (0xc4c)
    Types: TextFile
    Names: »B«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Slot, Instance, Text_Io;
with New_Ball, New_Box, New_Sticker;
with Ball_Features, Box_Features, Sticker_Features, Slot;

package body Bbs_Tests is
    use Ball_Features, Box_Features, Sticker_Features, Slot.Operators;
    use New_Ball, New_Box, New_Sticker, Slot.Operators;
------------------------------------------------------------------------------
    function Pack_It_Test (The_Ball    : New_Ball.Object;
                           The_Box     : New_Box.Object;
                           The_Sticker : New_Sticker.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  New_Box.Value_Of (The_Box, State) =
                     State_Slot_Box.Value (Is_Empty) and then
                  New_Box.Value_Of (The_Box, Size) >
                     New_Ball.Value_Of (The_Ball, Size) and then
                  New_Sticker.Value_Of (The_Sticker, Colour) =
                     New_Ball.Value_Of (The_Ball, Colour) and then
                  not New_Box.Exist
                         (Attribute => Size,
                          Between   => New_Ball.Value_Of (The_Ball, Size),
                          And_Size  => New_Box.Value_Of (The_Box, Size));
    end Pack_It_Test;

------------------------------------------------------------------------------

    function Sticker_Lack_Test (The_Ball : New_Ball.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  not New_Sticker.Exist
                         (Attribute  => Colour,
                          Operator   => New_Sticker.Equal,
                          Value      => New_Ball.Value_Of (The_Ball, Colour),
                          Attribute2 => State,
                          Operator2  => New_Sticker.Equal,
                          Value2     => State_Slot_Sticker.Value (Is_Unused));
    end Sticker_Lack_Test;

------------------------------------------------------------------------------

    function Box_Lack_Test (The_Ball : New_Ball.Object) return Boolean is

    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  not New_Box.Exist
                         (Attribute  => Size,
                          Operator   => New_Box.Greater,
                          Value      => New_Ball.Value_Of (The_Ball, Size),
                          Attribute2 => State,
                          Operator2  => New_Box.Equal,
                          Value2     => State_Slot_Box.Value (Is_Empty));
    end Box_Lack_Test;

------------------------------------------------------------------------------

    function Too_Big_Test (The_Ball : New_Ball.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) > Max_Size;
    end Too_Big_Test;

end Bbs_Tests;