I understand how to use a preprocessor directive like this:
#if SOME_VARIABLE
// Do something
#else
// Do something else
#endif
But what if I only want to do something IF NOT SOME_VARIABLE.
Obviously I still could do this:
#if SOME_VARIABLE
#else
// Do something else
#endif
. . . leaving the if empty, But is there a way to do:
#if not SOME_VARIABLE
// Do something
#endif
Apple documentation here suggests not, but this seems like a very basic need.
Basically I want to do the preprocessor equivalent of:
if(!SOME_VARIABLE)(
{
// Do Something
}
you could try:
#if !(SOME_VARIABLE)
// Do something
#endif