guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GH replacement proposal and bool datatype


From: Nelson H. F. Beebe
Subject: Re: GH replacement proposal and bool datatype
Date: Thu, 22 Apr 2004 08:34:26 -0600 (MDT)

Dale P. Smith <address@hidden> comments:

>> Istr that the new C standard has a bool type.  (Maybe I'm thinking of C++)
>> If it does, shouldn't there be a plan to use that?

Both have bool, and C99 has <stdbool.h>, since the new type is
introduced via macros, unlike C++ where it is a new keyword.  From the
1999 ISO C Standard:

>> ...
>>      7.16  Boolean type and values <stdbool.h>
>> 
>> 1    The header <stdbool.h> defines four macros.
>> 2    The macro
>>            bool
>>      expands to _Bool.
>> 
>> 3    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.
>> 
>> 4    Notwithstanding the provisions of 7.1.3, a program may undefine and 
>> perhaps then
>>      redefine the macros bool, true, and false.213)
>> ...

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------




reply via email to

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