From ldalton@venus.net Fri Jun 14 15:50:16 1996
Return-Path: <daemon@ncar.UCAR.EDU>
Received: from Eng.Sun.COM by pacific.eng.sun.com (SMI-8.6/SMI-SVR4)
	id PAA15441; Fri, 14 Jun 1996 15:50:15 -0700
Received: from mercury.Sun.COM by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id PAA24793; Fri, 14 Jun 1996 15:50:11 -0700
Received: by mercury.Sun.COM (Sun.COM)
	id PAA19035; Fri, 14 Jun 1996 15:50:10 -0700
Received: by ncar.ucar.EDU (NCAR Local/ NCAR Central Post Office 03/11/93)
	id QAA06599; Fri, 14 Jun 1996 16:50:07 -0600 (MDT)
Received: from relay7.UU.NET by ncar.ucar.EDU (NCAR Local/ NCAR Central Post Office 03/11/93)
	id QAA06583; Fri, 14 Jun 1996 16:49:58 -0600 (MDT)
Received: from news.venus.net by relay7.UU.NET with SMTP 
	(peer crosschecked as: news.venus.net [205.243.72.5])
	id QQaucx03059; Fri, 14 Jun 1996 18:49:57 -0400 (EDT)
Received: (from news@localhost) by news.venus.net (8.6.12/8.6.12) id SAA04123; Fri, 14 Jun 1996 18:55:03 -0400
To: comp-std-c++@uunet.uu.net
From: Larry Dalton <ldalton@venus.net>
Newsgroups: comp.std.c++
Subject: RE: How can I tell if my compiler supports the bool type?
Organization: Larry Dalton Consulting
Lines: 53
Message-ID: <01bb5a4c.83456c80$4048f3cd@dtk>
References: <4pnpmp$14oq@ausnews.austin.ibm.com>
X-NNTP-Posting-Host: ch1-p0.venus.net
X-Newsreader: Microsoft Internet News
Content-Length: 1503
X-Lines: 53
Approved: clamage@eng.sun.com (comp.std.c++)

Why not:
#define FALSE 0
#define TRUE !FALSE

That should cover all possibilities...

Larry.

On Thursday, June 13, 1996, Timur Tabi wrote...
> I heard about the new bool type, and I'm looking forward to having it
> supported in the compilers I use (Watcom's and IBM's).  In the meantime,
I'd
> like to use the new type in my current compilers, by doing something
like:
> 
> typedef int bool;	// or maybe I should do #define bool int?
> #define false 0
> #define true 1
> 
> However, if I try this on a "bool-enabled" compiler, I'll probably get
some
> errors.  So what I need is something like:
> 
> #ifndef bool
> typedef int bool;
> #define false 0
> #define true 1
> #endif
> 
> But I don't think this is going to work.  Does anyone have any
suggestions?
> I want to place these statements into a generic headerfile that will
compiler
> under both kinds of compilers.
> 
> --
> Timur "too sexy for my code" Tabi, timur@vnet.ibm.com
> Architect, OS/2 Warp realtime MIDI subsystem
> http://timur.austin.ibm.com/ (internal IBM only)
> http://www.shirenet.com/~crusader/Timur/ (external)
> ---
> [ comp.std.c++ is moderated.  To submit articles: try just posting with 
    ]
> [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    
    ]
> [ FAQ:     
http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
> [ Policy:  
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
> [ Comments? mailto:std-c++-request@ncar.ucar.edu                        
    ]
> 



[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



