[fpc-pascal] case statement
Michael Van Canneyt
michael at freepascal.org
Sat Dec 16 10:04:41 CET 2023
On Fri, 15 Dec 2023, Adriaan van Os wrote:
> Michael Van Canneyt via fpc-pascal wrote:
>
>>>> The fact that the semicolon before the else is optional ?
>>>
>>> I don't see a semicolon in the formal syntax.
>>
>> This works:
>
> OK, than an optional semicolon must be added to the <exceptionhandlers> rule
>
> exceptionhandlers = [ exception-handler { ";" exception-handler } [ ";" ] [
> "ELSE" statement-list ] | statement-list ] .
Well, you can have ;;;;; as well.
It means exception-handler can be empty in your repeat:
{ ';' [exception-handler] }
Or the whole ; is simply sloppyness on the part of the compiler.
Michael.
More information about the fpc-pascal
mailing list