Xref: utzoo comp.lang.c++:4780 comp.lang.c:22225 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!texsun!texbell!vector!attctc!wjf From: wjf@attctc.Dallas.TX.US (Jesse Furqueron) Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Time to standardize "true" and "false" Summary: "TRUE" values of TRUE & FALSE Keywords: true false C C++ Message-ID: <9464@attctc.Dallas.TX.US> Date: 24 Sep 89 22:21:20 GMT References: <13730@well.UUCP> Followup-To: poster Distribution: comp Organization: The Unix(R) Connection, Dallas, Texas Lines: 41 In article <13730@well.UUCP>, nagle@well.UUCP (John Nagle) writes: > > I would like to suggest that the time has come to standardize the > Boolean values in C. Most programs have definitions of these, but they > differ and clash. As the typing rules become ever tighter, and the number xyzzy!! and text disappears... > > I would suggest that the standardized definition be > If it's too late to fix this in C, it should be fixed in C++, where > typing is taken more seriously. > > John Nagle I would suggest rather than FALSE = 0 and TRUE = 1, that the "real" definition of TRUE is not FALSE (TRUE = not 0), i.e. TRUE = !0. Therefore the following #define FALSE 0 #define TRUE !0 or for c++ folks const boolean (FALSE=0, TRUE=!0); I believe (if this tired and aged memory serves me correctly) that somewhere K&R refers to this being the evalutations used in if and while statements. Jesse Furqueron VISystems 11910 Greeneville Suite 300 LB 29 Dallas, Tx. 75243 (214) 907-8080 ------------------------------------------------------------------------------- As always, the opinions expressed by myself are not necessarily those of my employer... maybe one of these days they'll learn to listen!!! -------------------------------------------------------------------------------