This code fails to compile due to the extra semicolon:
MODULE Test3;
(* Fails to compile in line 15 *)
VAR
res : LONGINT;
PROCEDURE Test() : LONGINT;
VAR i, j : LONGINT;
BEGIN
i := 0; j := 6;
WHILE i < 10 DO
IF i = 8 THEN
RETURN i
ELSIF i = 7 THEN
RETURN i; (* Error triggered by this extra semicolon *)
ELSIF i = j THEN
RETURN i
END;
INC(i)
END;
END Test;
BEGIN
res := Test();
END Test3.
This code fails to compile due to the extra semicolon: