Path: utzoo!attcan!uunet!mtxinu!ed From: ed@mtxinu.UUCP (Ed Gould) Newsgroups: comp.unix.wizards Subject: Re: #defines with variable # arguments Message-ID: <604@mtxinu.UUCP> Date: 17 May 88 18:03:14 GMT References: <2855@phoenix.Princeton.EDU> <52949@sun.uucp> <152@hropus.UUCP> <2097@rtech.UUCP> Reply-To: ed@mtxinu.UUCP (Ed Gould) Distribution: na Organization: mt Xinu, Berkeley Lines: 17 >If you do > >#define Dprintf if(Debug) printf > >you don't get any warnings; you do get possible dangling else problems. To avoid the dangling-else problem, use #define Dprintf if(Debug == 0); else printf for the same effect. -- Ed Gould mt Xinu, 2560 Ninth St., Berkeley, CA 94710 USA {ucbvax,uunet}!mtxinu!ed +1 415 644 0146 "I'll fight them as a woman, not a lady. I'll fight them as an engineer."