Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Profiling Civserver again
Home

[Freeciv-Dev] Re: Profiling Civserver again

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Thu, 2 Aug 2001 04:06:18 +0100 (WET DST)

On Wed, 1 Aug 2001, Ross W. Wetmore wrote:

> It is also unsafe. Boolean TRUE values are undefined by the standards, and 
> there is no guarantee that this is not represented by any non-zero set of
> bits. You need to do this as (X >= 0 ? 1 : 0) to be 100% safe.

Please read ANSI X3.159-1989 section 3.3.8.
I get sad each time i see people busting their finges typing such futile
monstruosities as you typed above (they even make the code more
unreadable). I also don't like to see these kinds of things:

if (p==NULL)
if (p!=NULL)

when this is much more compact:

if (!p)
if (p)

Happy coding,

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




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