3 ms·
I don't advocate the use of this macro, but if you do use it you should really wrap the parameters and the whole expression in parentheses to avoid precedence i
by Liquid_Fire 6y ago
I don't advocate the use of this macro, but if you do use it you should really wrap the parameters and the whole expression in parentheses to avoid precedence issues:
#define TERN(c, a, b) ((c) ? (a) : (b))
- sophistc 6y agoExactly, this is C macro 101.