home *** CD-ROM | disk | FTP | other *** search
- From: rich@eddie.mit.edu (Richard Caloggero)
- Newsgroups: alt.sources,comp.sources.d
- Subject: #defineing debug() ...
- Message-ID: <1990May8.190247.8379@eddie.mit.edu>
- Date: 8 May 90 19:02:47 GMT
-
-
- /* How about the following... */
- /* Please mail to "rich@eddie.mit.edu" if there is a reason why this isn't a good technique!!! */
- /* If you want debuging info to go to stderr, this won't work. */
-
- #ifdef DEBUG_SWITCH
- #define debug printf
- #else
- #define debug
- #endif
-
- main()
- {
- int stuff = 777;
- debug ("stuff = %d", stuff);
- }
-
- --
- -- Rich (Richard Caloggero) (rich@eddie.mit.edu).
- The circle is open, but unbroken.
- Merry meet, merry part,
- and merry meet again.
-