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

⟦d623eef31⟧ TextFile

    Length: 3732 (0xe94)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with System_Expression;
with Text_Io;
with Expression;

use Expression;
use System_Expression;
procedure Test_Expressions is
begin
    Text_Io.Put_Line ("all following values must be true");

    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Equal (0))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Less (1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Less_Or_Equal (0))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Greater (-1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Greater_Or_Equal (0))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Different (1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Any)));
    Text_Io.Put_Line (Boolean'Image (Match (10, Is_Any)));
    Text_Io.Put_Line (Boolean'Image (Match (110, Is_Any)));
    Text_Io.Put_Line (Boolean'Image (Match (20, Is_Any)));
    Text_Io.Put_Line (Boolean'Image (Match (30, Is_Any)));

    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Equal (0) and  
                                                  Is_Different (1) and  
                                                  Is_Greater (-1) and  
                                                  Is_Less (1) and  
                                                  Is_Any)));

    Text_Io.Put_Line (Boolean'Image (Match (1, Define_As (A))));
    Text_Io.Put_Line (Boolean'Image (Match (2, Define_As (B))));
    Text_Io.Put_Line (Boolean'Image (Match (3, Define_As (C))));

    Text_Io.Put_Line (Boolean'Image (Match (3, Is_Equal (C))));  
    Text_Io.Put_Line (Boolean'Image (Match
                                        (3, Is_Equal (Value (A) + Value (B)))));

    Text_Io.Put_Line (Boolean'Image (Match (2, Is_Equal (B) and  
                                                  Is_Greater (A) and  
                                                  Is_Less (C))));

    Text_Io.Put_Line (Boolean'Image
                         (Match (12, Is_Equal (Value (3) * Value (4)))));
    Text_Io.Put_Line (Boolean'Image
                         (Match (-12, Is_Equal (Value (3) * Value (-4)))));
    Text_Io.Put_Line (Boolean'Image
                         (Match (12, Is_Equal (abs Value (-3) * Value (4)))));
    Text_Io.Put_Line (Boolean'Image
                         (Match (12, Is_Equal (abs (Value (-3) * Value (4))))));

    Text_Io.Put_Line
       (Boolean'Image (Match (15, Is_Equal (Value (3) +  
                                            Value (3) * Value (4) -  
                                            Value (10) +  
                                            Value (2) * Value (5)))));
    Text_Io.Put_Line
       (Boolean'Image (Match (16, Is_Greater (Value (3) +  
                                              Value (3) * Value (4) -  
                                              Value (10) +  
                                              Value (2) * Value (5)))));
    Text_Io.Put_Line
       (Boolean'Image (Match (14, Is_Less (Value (3) +  
                                           Value (3) * Value (4) -  
                                           Value (10) +  
                                           Value (2) * Value (5)))));


    Text_Io.Put_Line ("all following values must be false");

    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Equal (1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Less (0))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Less_Or_Equal (-1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Greater (0))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Greater_Or_Equal (1))));
    Text_Io.Put_Line (Boolean'Image (Match (0, Is_Different (0))));

    Text_Io.Put_Line (Boolean'Image
                         (Match (13, Is_Equal (Value (3) * Value (4)))));


end Test_Expressions;