Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site drivax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!amdahl!drivax!landauer From: landauer@drivax.UUCP (Doug Landauer) Newsgroups: net.lang.c Subject: Re: Cryptic C (Actually typedef ? boolean;) Message-ID: <212@drivax.UUCP> Date: Tue, 20-Aug-85 15:08:04 EDT Article-I.D.: drivax.212 Posted: Tue Aug 20 15:08:04 1985 Date-Received: Sun, 25-Aug-85 05:16:14 EDT References: <2913@ncsu.UUCP> <709@brl-tgr.ARPA> Organization: Digital Research, Monterey, CA Lines: 17 Doug Gwyn says: > I am pretty conservative when it comes to defining one's own > language extensions, this one seems like a winner: > > typedef int bool; > #define false 0 > #define true 1 My favorite way to do this one is typedef enum { false, true } boolean ; It provides a little more type checking than your typedef. -- -- Doug Landauer -- ...[ ihnp4 | mot | ucscc | amdahl ] !drivax!landauer -- "I survived the DRI layoffs." -- -- "(So far!)" --