// Test of boolean operations
//
// $Id: test2.mgl,v 1.3 2004/11/29 11:17:21 gkminix Exp $

program test2;

const
  c1 = true;
  c2 = false;

var
  b1, b2 : boolean;
  i1, i2 : integer;
  s1, s2 : string;

begin

// Boolean assignments
  b1 := true;
  b2 := false;
  b1 := c1;
  b2 := c2;

// Simple boolean operations
  b1 := not b2;
  b2 := b1 or b2;
  b2 := b1 xor b2;
  b2 := b1 and b2;

// Complex expressions
  b2 := (b1 or b2) and true;
  b2 := (b1 or b2) and false;
  b2 := b1 xor b2 or b1;
  b2 := (b1 xor b2) or b1;

// Comparisons
  b2 := 1 = 2;
  b2 := (1 + 3) > 2;
  b2 := c1 <> c2;
  b2 := "teststring" > "test";
  b2 := "teststring" = "test" + "string";
  b2 := b1 = b2;
  i1 := 20;
  i2 := 30;
  b2 := (i1 + i2) > i1;
  s1 := "teststring";
  s2 := "test";
  b2 := s1 > s2;
end.

