Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!jb3o+ From: jb3o+@andrew.cmu.edu (Jon Allen Boone) Newsgroups: comp.lang.c Subject: Nested Macros Message-ID: Date: 20 Nov 89 15:26:32 GMT Organization: Class of '92, Carnegie Mellon, Pittsburgh, PA Lines: 15 A friend is attempting to write a macro along the following lines: #define DEBUG 1 #define DB(X) #ifdef (DEBUG) printf(X) however, this results in an error when he attempts to compile it. does anyone know how he would go about writing a macro that would allow him to simply type DB(x) in his code and not have to type #ifdef (DEBUG) printf(X) everywhere instead? Any help would be greatly appreciated. Please carbon copy your reply to pg0p@andrew.cmu.edu, as well as to jb3o@andrew.cmu.edu and the board. thank you...