It is working now on 2.2.4. I think it was a temporary IDE glitch, which is what I suspected. Adding the ; made it go away, but it wasn't really the problem<br><br><div class="gmail_quote">2010/7/1 Mattias Gärtner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de">nc-gaertnma@netcologne.de</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Zitat von Frank Church <<a href="mailto:vfclists@gmail.com" target="_blank">vfclists@gmail.com</a>>:<div>
<div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I will be upgrading to 2.4.0 soon.<br>
<br>
It shouldn't be an error then.<br>
<br>
2010/7/1 Guillermo Martínez Jiménez <<a href="mailto:gmartinez@burdjia.com" target="_blank">gmartinez@burdjia.com</a>><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
> procedure TfrmHometel.SetSplitterSizes;<br>
> var<br>
> i: integer;<br>
> begin<br>
> for i:=3D 0 to ComponentCount - 1 do<br>
> begin<br>
> if Components[i] is TSplitter then<br>
> begin<br>
> with TSplitter(Components[i]) do<br>
> begin<br>
> if Cursor =3D crHSplit then<br>
> Width :=3D 7<br>
> else if Cursor =3D crVSplit then<br>
> Height :=3D 7;<br>
> ; // <-- removing this semicolon results in a syntax error. Is it<br>
> syntax error some kind of extra strict compiler check.<br>
> Color :=3D clBlue;<br>
> end;<br>
> end;<br>
> end;<br>
> end;<br>
<br>
Compare with next:<br>
<br>
if Cursor =3D crHSplit then<br>
Width :=3D 7<br>
else<br>
if Cursor =3D crVSplit then<br>
Height :=3D 7; // <-- This semicolon is for the "if".<br>
; // <-- This semicolon is for the "else".<br>
</blockquote></blockquote>
<br></div></div>
No. A semicolon ends *all* open if/if-else/do statements.<br>
The second semicolon is an empty statement - a 'no operation'.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Is like this:<br>
<br>
IF ... THEN<br>
BEGIN<br>
...<br>
END<br>
ELSE BEGIN<br>
IF ... THEN<br>
BEGIN<br>
...<br>
END; // <-- This END is for the "IF".<br>
END; // <-- This END is for the "ELSE".<br>
<br>
I recommend to use "BEGIN ... END" blocks in nested "IF" always to<br>
prevent this kind of mistakes.<br>
</blockquote></blockquote>
<br></div>
In general I agree, but in this case there are no nested ifs, so it won't help here.<br><font color="#888888">
<br>
Mattias</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>