Re: [AD] bool

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, 2007-06-26 at 18:19 +0200, Michal Molhanec wrote:
> Elias Pschernig napsal(a):
> > The new events and display API use a "bool" type (as well as
> > "true"/"false" constants) - but I can't find any references to either of
> > those in the C99 standard.
> 
> that's simple, just learn to read :-)
> 
> "
> 6.2.5 Types
> 
> An object declared as type _Bool is large enough to store the values 0 
> and 1.
> 
> 7.16 Boolean type and values <stdbool.h>
> 
> The header <stdbool.h> defines four macros.
> 
> The macro
> bool
> expands to _Bool.
> 
> The remaining three macros are suitable for use in #if preprocessing 
> directives. They are
> true
> which expands to the integer constant 1,
> false
> which expands to the integer constant 0, and
> __bool_true_false_are_defined
> which expands to the integer constant 1.
> "

Hm, strange, so it defines it as a macro expanding to _Bool.. instead of
just defining bool :P Anyway, looks good then :)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/