Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!noose.ecn.purdue.edu!cidmac.ecn.purdue.edu!jmoore From: jmoore@cidmac.ecn.purdue.edu (James D Moore) Newsgroups: comp.lang.c Subject: Re: #define DEBUG... (using printf for debugging) Message-ID: <1990May4.130346.8707@ecn.purdue.edu> Date: 4 May 90 13:03:46 GMT References: <1717@engage.enet.dec.com> Sender: news@ecn.purdue.edu (USENET news) Organization: Purdue University Engineering Computer Network Lines: 19 In article <1717@engage.enet.dec.com> wallace@oldtmr.enet.dec.com (Ray Wallace) writes: > >In article <4247@tekfdi.FDI.TEK.COM>, wallyk@tekfdi.FDI.TEK.COM (Wally Kramer) >writes... >>In article <40628@cornell.UUCP> gordon@cs.cornell.edu (Jeffrey Adam Gordon) >>writes: >>>I want to have a DEBUG flag which controls whether diagnostic printfs >>>are executed or not. Several people have pointed out several ways to use the #define to equate DEBUG to printf. I personaly feel that using the standard #ifdef and using the the "-D" option at compile time is the best way to do it. Am I missing something here ? I do this with different levels of debugging so I can have several flags. Anyway that is my $0.2 worth. Jim Moore Purdue University jmoore@cidmac.ecn.purdue.edu