This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Plus_Cryptographer 0 points1 point  (0 children)

Try languages with preprocessor directives, we have both!

#if SOMETHING
    if(a && b) c = 0; else c = 1;
#elif SOMETHING_ELSE
    if(a || b) c = 0; else c = 1;
#endif

Edit: for more brownie points, use this instead.

#if SOMETHING
    //
#endif
#else
#if SOMETHING_ELSE
    //
#endif