www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/15/04:23:47

Date: Wed, 14 Sep 94 22:08 PDT
From: jdp AT polstra DOT com (John Polstra)
To: djgpp AT polstra DOT com
Subject: Re: named enum?

> >My guess is that GCC is a sufficiently late version that it supports
> >the use of the 'bool' type, which has been accepted by the ANSI committee
> >which is deciding the C++ standard.

That is correct.

> What are the advantages of boolean variables in C?  What is wrong with
> zero and non-zero?  I think that there are more disadvantages than
> advantages.  It seems that whenever this topic comes up in comp.lang.c,
> all the C gurus discourage the use of such variables.  As a result,
> when I see TRUE/FALSE code in C, I get nervous about the quality of the
> code.  For example, MS-Windows API is full of TRUE/FALSE stuff and I
> know that some of it is poorly designed.  C is not PASCAL.

And ... C++ is not C.

   John Polstra                                       jdp AT polstra DOT com
   John D. Polstra & Co., Inc.                   Phone (206) 932-6482
   Seattle, Washington USA                         Fax (206) 935-1262
   "Self-knowledge is always bad news."                 -- John Barth

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019