Focused Wolf

does codewarrior support multiline macros with parameters?

Discussion created by Focused Wolf on Sep 26, 2008
Latest reply on Sep 27, 2008 by Focused Wolf

So i'm just making sure i can do multi line macros.

We're using: "CodeWarrior Development Studio for ColdFire Architectures v6.3" and targeting this: "MCF52235 ColdFire Integrated Microcontroller"

So this is just an example of the type of macro i'm planning (My actual macro will contain 68K assembly, but this example is the same style i'll be using with the "\" and parameters):

#define max(a,b) \
({ typeof (a) _a = (a); \
typeof (b) _b = (b); \
_a > _b ? _a : _b; })

Is this ok?