The preprocessing directives #define and #undef allow the definition of identifiers
which hold a certain value. These identifiers can simply be
constants or a macro function. The directives #ifdef
and #ifndef allow conditional compiling of
certain lines of code based on whether or not an identifier has
been defined.
Syntax:
#defineidentifier replacement-code
#undefidentifier
#ifdefidentifier #else or #elif #endif
#ifndefidentifier #else or #elif #endif
#ifdefidentifier is the same is
#if defined(identifier). #ifndefidentifier is the same as
#if !defined(identifier).
An identifier defined with #define is
available anywhere in the source code until a #undef
is reached.
A function macro can be defined with #define
in the following manner: