#indef Preprocessor Directive

The #ifndef directive checks for the existence of macro definitions.

If the identifier specified is not defined as a macro, the tokens that immediately follow the condition are passed on to the compiler.

An identifier must follow the #ifndef keyword. The following example defines MAX_LEN to be 50 if EXTENDED is not defined for the preprocessor. Otherwise, MAX_LEN is defined to be 75.

#ifndef EXTENDED
#   define MAX_LEN 50
#else
#   define MAX_LEN 75
#endif

 



Conditional Compilation Directives
Preprocessor Directives


#elif Preprocessor Directive
#endif Preprocessor Directive
#if Preprocessor Directive
#ifdef Preprocessor Directive
List of Preprocessor Directives