# Test of boolean operations # # $Id: test2.mgl,v 1.2 2001/08/27 08:40:16 gkminix Exp $ const c1 = true; c2 = false; screen main; 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.