--
-- This is a test of boolean operations for both float and integer types.
--
package test6 is body
    i, j : integer;
    a, b : float;
begin 
    i := 1;
    j := 2;
    a := 1.0;
    b := 2.0;

    -- test integer boolean operations
    if i == j then write("check your code, it thinks 1 == 2"); end if;
    if i > j then write("check your code, it thinks 1 > 2"); end if;
    if i >= j then write("check your code, it thinks 1 >= 2"); end if;
    if j < i then write("check your code, it thinks 2 < 1"); end if;
    if j <= i then write("check your code, it thinks 2 <= 1"); end if;
    if i <> i then write("check your code, it thinks 1 <> 1"); end if;

    -- test float boolean operations
    if a == b then write("check your code, it thinks 1.0 == 2.0"); end if;
    if a > b then write("check your code, it thinks 1.0 > 2.0"); end if;
    if a >= b then write("check your code, it thinks 1.0 >= 2.0"); end if;
    if b < a then write("check your code, it thinks 2.0 < 1.0"); end if;
    if b <= a then write("check your code, it thinks 2.0 <= 1.0"); end if;
    if a <> a then write("check your code, it thinks 1.0 <> 1.0"); end if;

    -- test float boolean operations with integer coercions
    if i == b then write("check your code, it thinks 1 == 2.0"); end if;
    if a == j then write("check your code, it thinks 1.0 == 2"); end if;
    if i > b then write("check your code, it thinks 1 > 2.0"); end if;
    if a > j then write("check your code, it thinks 1.0 > 2"); end if;
    if i >= b then write("check your code, it thinks 1 >= 2.0"); end if;
    if a >= j then write("check your code, it thinks 1.0 >= 2"); end if;
    if j < a then write("check your code, it thinks 2 < 1.0"); end if;
    if b < i then write("check your code, it thinks 2.0 < 1"); end if;
    if j <= a then write("check your code, it thinks 2 <= 1.0"); end if;
    if b <= i then write("check your code, it thinks 2.0 <= 1"); end if;
    if i <> a then write("check your code, it thinks 1 <> 1.0"); end if;
    if a <> i then write("check your code, it thinks 1.0 <> 1"); end if;
    write("test 6 is finished");
end.
