I believe I read somewhere that you should always align the preprocessor # in the first column, but now I'm having trouble verifying my sources. I googled, but didn't find any real good info. Is there a rule or recommendation on placing whitespaces before the bracket? Or immediately after, for that matter. I've seen different constructs:
Code:
#ifdef FOO
#include "foo.h"
#endif
Code:
#ifdef FOO
# include "foo.h"
#endif
The reason I'm asking is that I've started using the following approach when it comes to debugging:
Code:
#ifdef DEBUG
printf("Test print: foo");
#endif
Deep inside functions, this would look a bit bizarre if I have to keep the macros in the first column. If that's the recommendation though, I will of course adapt. There must be a succinct guideline for this somewhere - please point me in the right direction!
Thanks!
-tretton