summaryrefslogtreecommitdiff
path: root/minie/test4.e
blob: 1914b0273b6c1dd1360393498a812e08ee0cb5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module test4;

(* data types, assignment and if statement *)

var
	x : integer;
	y : integer;
	z : integer;
	b : boolean;
	c : byte;
	res : integer;
	
begin
	x := 7+4*(3-1/2);
	y := -22+(-x);
	z := x;
	c := 45;
	x := c;
	b := ( x < y ) and not ( z = x );
	if b do
		if true do
			res := 1;
		else
			res := 2;
			if false do res := 3 end
		end;
		b := true
	else
		res := 2;
		b := false
	end
end