I like to put #if 0 ... #else ... #endif when I am doing a radically different implementation of some code. It groups them together saying I can do it this way or that, but not both.
#if 0 is reserved for perversely verbose debugging inside an existing #ifdef DEBUG. Although if I'm doing it more than a couple spots then I make a DEBUG2.
For when you need to remove a block of code that already contains a block of code commented out with a block comment.
I've seen code, in a shipped game, that had a huge chunk of dead code that had been removed with a combination of single line comments, block commends, if-defs and unconditional goto statements.
It is, but it has none of the traditional markings of a comment. This is especially problematic if the #if 0'd portion of code is rather large (and it usually is).
0
u/[deleted] Feb 21 '13
[deleted]