<div dir="ltr"><div><div><div><div><div><div>> In C too, but since C99.<br><br></div>AFAIK this only applies to the "for (int i = 0; i < n; i++)" syntax.<br><br></div>while (...) {<br></div> int i = 123, j = 345;<br></div> k = i + j;<br>}<br><br></div>has been correct (and imho, preferable) syntax since K&R C<br><br></div>/Thomas<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-23 0:17 GMT+02:00 Mateusz Loskot <span dir="ltr"><<a href="mailto:mateusz@loskot.net" target="_blank">mateusz@loskot.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 22 April 2018 at 20:07, Kurt Schwehr <<a href="mailto:schwehr@gmail.com">schwehr@gmail.com</a>> wrote:<br>
> Kristian,<br>
><br>
> Things to do when you are about to have a kid and want a distraction :)<br>
<br>
</span>Congratulations! I still remember that distraction pursuit myself ;-)<br>
<span class=""><br>
> On Sun, Apr 22, 2018 at 8:10 AM, Kristian Evers <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>> wrote:<br>
>><br>
</span><span class="">>> - Combine definition and declaration<br>
>><br>
>> It works in this example but I don’t think it can be enforced in more<br>
>> complicated code.<br>
>> Variable declarations have to be made at the start of a block and that is<br>
>> not always possible.<br>
>><br>
><br>
> Agreed. Not always possible or always a good thing. And a style question<br>
> is do you allow variables to be defined in sub scopes? In C++, the answer<br>
> is usually to keep things as tight/narrow as possible.<br>
<br>
</span>In C too, but since C99.<br>
<br>
Best regards,<br>
<span class="HOEnZb"><font color="#888888">-- <br>
Mateusz Loskot, <a href="http://mateusz.loskot.net" rel="noreferrer" target="_blank">http://mateusz.loskot.net</a><br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a></div></div></blockquote></div><br></div>