Why does the Delphi compiler ignore this missing parenthesis?
function Test: Boolean;
begin
Exit(True; // <-- eek! it compiles...
end;
I found some of my code looking like this and first thought that Delphi ignores my unit - but it just ignores this type of syntax error. So now of course I want to know why.
I'm guessing Exit
is considered a token unto itself, and as such anything defined within the same scope after Exit
is simply ignored by the compiler (since it cannot execute those instructions anyway).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With