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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to