> Hi All,
> I am trying to compile multiline macro using m68k-palmos-gcc compiler and
> getting errors.
> Where as single line macro works fine for me.
> Is their any setting that needs to be done to resolve the problem or their
> is any limitation.

#define ABS(a) ((a) < 0) ? -(a) : (a))

can be written as:

#define ABS(a) \
  ((a) < 0) \
    ? -(a) \
    : (a))

not that anyone would do that - but, that gives you an idea of how to do
a multiline macro :) you need to put a continuation character "\" at the
end of the line (no spaces after)

---
Aaron Ardiri
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to