[fpc-pascal] Is this if /else syntax wrong?
Frank Church
vfclists at gmail.com
Wed Jun 30 15:29:27 CEST 2010
The following code generates a syntax error, if the semicolon after the
if/else statement is removed.
Is its absence a syntax error? Pascal version is 2.2.4
procedure TfrmHometel.SetSplitterSizes;
var
i: integer;
begin
for i:= 0 to ComponentCount - 1 do
begin
if Components[i] is TSplitter then
begin
with TSplitter(Components[i]) do
begin
if Cursor = crHSplit then
Width := 7
else if Cursor = crVSplit then
Height := 7;
; // <-- removing this semicolon results in a syntax error. Is it
syntax error some kind of extra strict compiler check.
Color := clBlue;
end;
end;
end;
end;
--
Frank Church
=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100630/7134f5cd/attachment.html>
More information about the fpc-pascal
mailing list