It looks like you're using MY_MACRO to set things up for the rest of
the file. If that's the case, why not use an include file? That is,
instead of:
MY_MACRO
...rest of the file...
Use:
#include "MySetup.h"
...rest of the file...
MySetup.h could then look as you would expect:
#ifdef BUILD_FLAG
#preprocessor flags
globals
#else
#other preprocessor flags
globals
#endif
-- Keith Rollin
-- Palm OS Emulator engineer
At 2:59 PM +1000 6/20/01, James Nicholls wrote:
>Hi all, sorry in advanced that this is off topic for this forum, but you're
>the best source of C programmers I know of (I'm a C++ programmer).
>
>I want to know how to make this work in ANSI C/C++: (pseduo-code warning)
>
>#define MY_MACRO \
> #ifdef BUILD_FLAG \
> #preprocessor flags \
> globals \
> #else \
> #other preprocessor flags \
> globals \
> #endif
>
>The trouble (as far as I can tell) is that MY_MACRO expands to one line
>because of the line continuation escapes in the macro definition.
>
>So, my question is: how can I include line-breaks inside the #define?
>
>Thanks for any help you can give me,
>James.
--
-- Keith Rollin
-- Palm OS Emulator engineer
P.S. Check out the new e-mail address. [EMAIL PROTECTED] will work
for a while, but anyone mailing me needs to update to the new one
eventually.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/