delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/14/19:35:02

Date: Wed, 14 Sep 1994 14:36:39 -0400
From: davis AT amy DOT tch DOT harvard DOT edu ("John E. Davis")
To: djgpp AT sun DOT soe DOT clarkson DOT edu
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.

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.

--John

- Raw text -


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