Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang.c Subject: Re: Boolean Operators Slighted in C Message-ID: <1461@mmintl.UUCP> Date: Fri, 16-May-86 19:44:32 EDT Article-I.D.: mmintl.1461 Posted: Fri May 16 19:44:32 1986 Date-Received: Tue, 20-May-86 06:59:59 EDT References: <838@ihwpt.UUCP> <412@brl-smoke.ARPA> <147@daisy.warwick.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Distribution: net Organization: Multimate International, E. Hartford, CT Lines: 17 In article <147@daisy.warwick.UUCP> cudcv@daisy.warwick.ac.uk (Rob McMahon) writes: >In article <412@brl-smoke.ARPA> gwyn@brl.ARPA writes: >>typedef int bool; /* boolean data */ >>#define false 0 >>#define true 1 > >What about > typedef enum { false, true } bool; >? I will start using this when I can rely on having an ANSI standard compiler. At the moment, there are too many compilers where the expression in an if statement can't be an enum. (Not to mention compilers which don't support enums.) Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108