Open MrDurion opened 6 months ago
The END
in your example is as ambiguous as the dangling ELSE
, so it should produce an error. However, if the DISPLAY C
part is removed, then it becomes easy to interpet it one way, which is more thanks to the .
than to the END
…
Suppose we have the following sentence:
IF BOOLEXPR1 THEN DISPLAY A IF BOOLEXPR2 THEN DISPLAY B END DISPLAY C.
Then theEND
can be part of either the outerIF
, or the innerIF
. What is the correct way to interpret theEND
here? Is theEND
keyword meant to end the innermostIF
statement, like a break in loops for other languages, or is it an ambiguous thing and should we provide an error like the dangling-ELSE
?