Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!think!husc6!seismo!elsie!ado From: ado@elsie.UUCP Newsgroups: comp.lang.c Subject: Re: Defining TRUE and FALSE Message-ID: <7460@elsie.UUCP> Date: Thu, 9-Jul-87 10:30:10 EDT Article-I.D.: elsie.7460 Posted: Thu Jul 9 10:30:10 1987 Date-Received: Sun, 12-Jul-87 01:48:43 EDT References: <13851@watmath.UUCP> Organization: NIH-LEC, Bethesda, MD Lines: 35 Summary: lint In article <13851@watmath.UUCP>, jyegiguere@watmath.UUCP (Eric Giguere) writes: > The way we define these at the Computer Systems Group here at UW > (which we include in thefile for Waterloo C) > is: > > #define TRUE ( 0 == 0 ) > #define FALSE ( 1 == 0 ) I used to do this (well, actually, #define FALSE (!TRUE) is what I'd use), but code such as #define TRUE (0 == 0) #define FALSE (0 != 0) main() { int i; i = TRUE; return i; } gets flagged if you use lint's "-h" option: try.c(8): warning: constant in conditional context To keep lint quiet, I've reverted to #define TRUE 1 #define FALSE 0 -- UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.CSS.GOV Elsie and Ado are trademarks of Borden, Inc. and Ampex.