Here's one I like to use:<br><br><font size="2">if (0 == this){<br>
   then = that;<br>
}</font><br><br>If you accidentally use "=" instead of "==", you will get an error.<br><br>-Bob<br><br><div class="gmail_quote">On Fri, Dec 19, 2008 at 9:32 AM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">We're rapidly approaching the level of Holy War :)<br>
I think that people should be free to do "what works" within the<br>
minimal stylistic constraints of an astyle rule... we can talk<br>
paren-padding until we're blue in the face (I'm a padder, sue me:)<br>
<font color="#888888"><br>
P.<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Dec 19, 2008 at 9:22 AM, Obe, Regina <<a href="mailto:robe.dnd@cityofboston.gov">robe.dnd@cityofboston.gov</a>> wrote:<br>
> So does that mean Mark will have to give up his love for<br>
><br>
> if (this) then = that;<br>
><br>
> Unconsciously I do<br>
><br>
> if (this){<br>
>    then = that;<br>
> }<br>
><br>
> Though I can live with (except those spaces before and after this.  Do we<br>
> really need that?)<br>
><br>
> if ( this )<br>
> {<br>
>   then = that;<br>
> }<br>
><br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a> on behalf of Paul Ramsey<br>
> Sent: Fri 12/19/2008 11:47 AM<br>
> To: PostGIS Development Discussion<br>
> Subject: Re: [postgis-devel] STYLE<br>
><br>
> The ansi requirement unfortunately makes this worse:<br>
><br>
> if ( this )<br>
> {<br>
>   then = that;<br>
> }<br>
> else<br>
> {<br>
>   those = them;<br>
> }<br>
><br>
> BTW, the reason I spec'ed ansi is just because it seems to be the<br>
> majority of the existing code base. What comes out of my hands<br>
> unconciously is kr.<br>
><br>
> if ( this ) {<br>
>   then = that;<br>
> }<br>
><br>
> On Fri, Dec 19, 2008 at 7:41 AM, Obe, Regina <<a href="mailto:robe.dnd@cityofboston.gov">robe.dnd@cityofboston.gov</a>><br>
> wrote:<br>
>> Alright if you like it perhaps I was a bit too harsh and that isn't the<br>
>> one<br>
>> that bothers me the most. How about this concession.<br>
>><br>
>> //OKAY<br>
>> if (!binary) free(v);<br>
>><br>
>> //NOT OKAY<br>
>> if (!binary)<br>
>>   free(v);<br>
>><br>
>> //NOT OKAY<br>
>> if (!binary) free(v); printf(...);<br>
>><br>
>><br>
>> The issue I have with the NOT OKAY is that its too easy for a python<br>
>> programmer or some other language that relies on indentation to screw this<br>
>> up.<br>
>><br>
>> -----Original Message-----<br>
>> From: <a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a> on behalf of Mark<br>
>> Cave-Ayland<br>
>> Sent: Fri 12/19/2008 10:34 AM<br>
>> To: PostGIS Development Discussion<br>
>> Subject: Re: [postgis-devel] STYLE<br>
>><br>
>> Obe, Regina wrote:<br>
>><br>
>>> This I mentioned to Mark offlist, but since its sort of a STYLE issue I<br>
>>> thought I would restate it here.<br>
>>><br>
>>> I know C programmers are in love with doing this short-cut.<br>
>>><br>
>>> if (!binary) free(v);<br>
>>><br>
>>> I hate it.  It drives me crazy because its too prone to error when<br>
>>> someone comes<br>
>>> by and tries to stuff another statement in there and forgets to put the<br>
>>> bracket in.<br>
>><br>
>> Aaargh - I really like this and use it a lot :(<br>
>><br>
>> The convention is fairly easy to read: if there are no {}s then only the<br>
>> next statement is considered part of the if... or else... clause. Does<br>
>> that help at all?<br>
>><br>
>><br>
>> ATB,<br>
>><br>
>> Mark.<br>
>><br>
>> --<br>
>> Mark Cave-Ayland<br>
>> Sirius Corporation - The Open Source Experts<br>
>> <a href="http://www.siriusit.co.uk" target="_blank">http://www.siriusit.co.uk</a><br>
>> T: +44 870 608 0063<br>
>> _______________________________________________<br>
>> postgis-devel mailing list<br>
>> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
>><br>
>> ________________________________<br>
>><br>
>> The substance of this message, including any attachments, may be<br>
>> confidential, legally privileged and/or exempt from disclosure pursuant to<br>
>> Massachusetts law. It is intended solely for the addressee. If you<br>
>> received<br>
>> this in error, please contact the sender and delete the material from any<br>
>> computer.<br>
>><br>
>> ________________________________<br>
>><br>
>> Help make the earth a greener place. If at all possible resist printing<br>
>> this<br>
>> email and join us in saving paper.<br>
>><br>
>> _______________________________________________<br>
>> postgis-devel mailing list<br>
>> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
>><br>
>><br>
> _______________________________________________<br>
> postgis-devel mailing list<br>
> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
><br>
><br>
> ________________________________<br>
><br>
> The substance of this message, including any attachments, may be<br>
> confidential, legally privileged and/or exempt from disclosure pursuant to<br>
> Massachusetts law. It is intended solely for the addressee. If you received<br>
> this in error, please contact the sender and delete the material from any<br>
> computer.<br>
><br>
> ________________________________<br>
><br>
> Help make the earth a greener place. If at all possible resist printing this<br>
> email and join us in saving paper.<br>
><br>
> _______________________________________________<br>
> postgis-devel mailing list<br>
> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
><br>
><br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br>