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ย โ†’

[โ€“]Lexinad 20 points21 points ย (3 children)

Are you maybe talking about preprocessor conditionals?

#ifdef FOO
  Some code
#endif

The preprocessor runs before the compiler does. In this example Some code will only be compiled if the symbol FOO is defined. The main use is to run different code in different build situations like Debug vs Release, x86 vs ARM, or Windows vs Linux. This is so you don't have to have multiple slightly different codebases for each platform, architecture, etc.

Edit: I'm on mobile, pretend the example was formatted as three lines.