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]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Robert Brady <robert@xxxxxxxxxx>
Date: Thu, 2 Aug 2001 01:53:18 +0100 (BST)

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.

Here is a a quote from the C standard (ISO 9899:1999 aka C9X) you might
find interesting.

Section 6.5.8

:6. Each of the operators < (less than), > (greater than), <= (less than
:   or equal to), and >= (greater than or equal to) shall yield 1 if the
:   specified relation is true and 0 if it is false.89) The result has
:   type int.

-- 
Robert Brady
hadron@xxxxxxxxxxxxxx



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