c - goto label trick in a macro for condition -
there 1 evil macro trick don't remember , lot this:
public : var = 3; }
which should expand to
if(route == rooting_public) { var = 3; }
how can achieve ?
macros used reduce clutter; though lot of clutter indicates problems program structure.
the op's notion of possible macro not match c-syntax. along lines might be:
#define if_rooted(name) if (rooted_##name & input) { output = e##name; } #define rooted_first 16 #define rooted_second 64 #define efirst 1 #define esecond 2 if_rooted(first); if_rooted(second);
where input , output , repetitive test "clutter" eliminated. making table better way reduce clutter; op asked hint macros.
Comments
Post a Comment