Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: A minor style issue.
Home

[Freeciv-Dev] Re: A minor style issue.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: A minor style issue.
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Dec 2002 09:57:07 -0600

On Thu, Dec 19, 2002 at 03:43:44PM +0000, Per I. Mathisen wrote:
> On Thu, 19 Dec 2002, Gregory Berkolaiko wrote:
> > Our coding style guideline gives conflicting signal wrt use of
> > spaces between "if" and the condition:
> >
> > if(ptr == NULL)
> >
> > vs.
> >
> > if (ptr == NULL)
> ...
> >   - spaces are inserted before and after operators ("int i, j, k;"
> >     instead of "int a,b,c;" and "if (foo <= bar) c = a + b;" instead
> >     of "if(foo<=bar) c=a+b;")
> 
> Clearly the correct way of doing it is
> 
>       if (ptr == NULL)
> 
> > Should we clearly inforce one or the other?
> 
> Yes, I think so. We should also fix the Style Guide.

whatever, simply as long as we don't use the above example. I do not want
to be beholden to (ptr == NULL) when (ptr) suffices just fine. Eat it
Raimar ;)

-mike


[Prev in Thread] Current Thread [Next in Thread]