mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
Any processed section can contain further conditional clauses, nested to any depth. Each nested #else, #elif, or #endif directive belongs to the closest preceding #if directive.
The net result of the preceding scenario is that only one code section (possibly empty) will be compiled.
Directives #ifdef and #ifndef
You can use the #ifdef and #ifndef directives anywhere #if can be used. The #ifdef and #ifndef conditional directives let you test whether an identifier is currently defined or not. The line
#ifdef identifier
has exactly the same effect as #if 1 if identifier is currently defined, and the same effect as #if 0 if identifier is currently undefined. The other directive, #ifndef, tests true for the
The syntax thereafter follows that of the #if, #elif, #else, and #endif.
An identifier defined as NULL is considered to be defined.
page |
|
134 | MikroElektronika: Development tools - Books - Compilers |
|