Coming from C, I put a semicolon after every statement. Free Pascal rejects if x > 0 then WriteLn('positive'); else WriteLn('not positive'); with an error at else, yet a semicolon before end seems to be accepted everywhere. I also lost an hour on if Ready then; StartMotor;, which compiled and started the motor regardless of Ready.
What is the actual rule for semicolons in Pascal, and how do I structure nested if statements so that each else belongs to the if I intend?




