Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 alpha 4/3/85; site ukma.UUCP
Path: utzoo!watmath!clyde!cbosgd!ukma!david
From: david@ukma.UUCP (David Herron, NPR Lover)
Newsgroups: net.lang.c
Subject: Re: Cryptic C
Message-ID: <2076@ukma.UUCP>
Date: Thu, 22-Aug-85 00:20:06 EDT
Article-I.D.: ukma.2076
Posted: Thu Aug 22 00:20:06 1985
Date-Received: Sat, 24-Aug-85 15:00:55 EDT
References: <2913@ncsu.UUCP> <709@brl-tgr.ARPA> <1056@mtgzz.UUCP> <675@gitpyr.UUCP>
Reply-To: david@ukma.UUCP (David Herron, NPR Lover)
Organization: Univ. of KY Mathematical Sciences
Lines: 31

In article <675@gitpyr.UUCP> robert@gitpyr.UUCP (Robert Viduya) writes:
>In article <1056@mtgzz.UUCP>, dsk@mtgzz.UUCP (d.s.klett) writes:
...
>> 	typedef enum { False , True } Boolean;
...
>
>The problem with enums is that compiler allocate them as ints.  This
>means 1 wasted byte on a machine with a 16-bit int, 3 wasted bytes on
>a machine with a 32-bit int and so on and so forth.  All you really
>need is 1 byte (on most conventional machines).  I personally prefer:
>
>    #define	TRUE	1
>    #define	FALSE	0
>    typedef	char	bool;

Well, I personally prefer:

	#define TRUE (1==1)
	#define FALSE (1==0)
	typedef char bool;

Which is succint, to the point, and *machine*independant*!

'sides, constant expressions are calculated at compile time anyway.
-- 
--- David Herron
--- ARPA-> ukma!david@ANL-MCS.ARPA
--- UUCP-> {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!david
---        {ihnp4,decvax,ucbvax}!cbosgd!ukma!david

Hackin's in me blood.  My mother was known as Miss Hacker before she married!