1     (* NOTE:  lines marked illegal will cause compile time errors  *)
 2 PROGRAM ArithTest2 (input, output);
 3 
 4     VAR number1, number2, number3 : integer; 
 5     (* VAR required if and only if your program has variables in it *)
 6     (* If your program doesn't have variables, the BEGIN is expected *)
 7     (* after the header statement *)
 8                                                    
 9     real2, real3,real4        : real;
10 
11 BEGIN
12    number1 := 5;
13    number2 := 2;
14 
15    real2 := number1 / number2;  
16    writeln (' real2 is ', real2:3:1);
17    real4 := number1;
18    writeln (' real4 is ', real4:3:1);
19    number3 :=  number1 / number2; (* illegal, can't assign real value to integer*)
20    number3 := number1 DIV number2; (* integer division number3 is assigned 2 *)
21    writeln (number3);
22    real3 := number1/number2;   (* real division - real3 is assigned 2.5 *)
23    writeln (real3);
24    real3 := number1 DIV number2;  (* this is legal *)
25    writeln (real3);
26    number3 := number1 DIV real3; (* illegal, DIV expects integer operands *)
27    writeln (number3);
28    number3 := real3 DIV real4;   (* illegal, DIV expects integer operands *)
29    writeln (number3);
30    number3 := real3 DIV number2; (* illegal, DIV expects integer operands *)
31    writeln (number3);
32 END.
33