Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!rlgvax!vrdxhq!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: How can I use #define to make something completely disappear? Message-ID: <9187@mimsy.UUCP> Date: Sat, 31-Oct-87 22:23:47 EST Article-I.D.: mimsy.9187 Posted: Sat Oct 31 22:23:47 1987 Date-Received: Thu, 5-Nov-87 05:48:49 EST References: <10083@brl-adm.ARPA> <850@tut.cis.ohio-state.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 22 In article <850@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: >... I also added a command line option, say -d, so that even if DEBUG >was defined you needed -d to get the printfs. ... > >#define DBPRINT(arglist) if (dflag != 0) printf arglist I suggest instead #define DBPRINT(arglist) if (dflag == 0) /* void */; else printf arglist so that you can use, e.g., if (it was minor) DBPRINT((...)); else abort(...); without having the `else' wind in up the wrong place. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris