On 2013-12-28 15:47, Mark Morgan Lloyd wrote:
I can fix that either by putting a semicolon before the else- which I believe is strictly incorrect- or by putting begin/end around that conditional, or by inserting a dummy statement before the else likequit_: if High(lexemeListArray) = 1 then begin end; nop: begin end else
The problem is the compiler associates the else with the if..then and not with the case statement. All your fixes break the possible connection between the else and the if..then and that's why they work.
Your first fix (to just add a semicolon) would be my preferred one. I have lots of code that is written that way. I'm not sure why you think this is "strictly incorrect".
-- Cheers! Rich Saunders _______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
