On 29/12/2013 07:33, Mark Morgan Lloyd wrote:
Saunders, Rich wrote:
On 2013-12-28 15:47, Mark Morgan Lloyd wrote:
quit_: if High(lexemeListArray) = 1 then begin
end;
nop: begin end
else
....
Drat- a dangling else in a case! I should have spotted that, but
instead spent an hour or so picking at it.
1) If you use Lazarus then you can have case-labels highlighted (e.g add
underline/border, blend foreground by mixing in another color, bold,
...) It is in the color config.
That will (in this case) not highlight the else, so you will know the
else is part of the if.
2) I tried your code and it compiles (2.6.2 win32)
{$mode objfpc}{$H+}
procedure TForm1.FormCreate(Sender: TObject);
var
a: (help, help_, quit_);
b: Integer;
begin
try
case a of
help: begin
end;
help_: begin
end;
quit_: if b = 1 then begin
end
else
end // line 323
finally
end;
end;
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal