unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: GH replacement proposal and bool datatype
@ 2004-04-22 14:34 Nelson H. F. Beebe
  0 siblings, 0 replies; only message in thread
From: Nelson H. F. Beebe @ 2004-04-22 14:34 UTC (permalink / raw)
  Cc: beebe

Dale P. Smith <dsmith@actron.com> 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: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-22 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22 14:34 GH replacement proposal and bool datatype Nelson H. F. Beebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).