Question: Loop appearing before else in an if statement - semicolon requirement

Does anyone know why the following gives an error of invalid loop statement termination?

if true then
  for i from 1 to 2 do
  end do
else
end if

while putting a semicolon after `end do' fixes it.

This seems to only occur in if else statements, when end do appears directly before the else

Please Wait...