English
Language : 

CC78K0S Datasheet, PDF (147/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 9 PREPROCESSING DIRECTIVES (COMPILER DIRECTIVES)
(5) #else directive
Conditional Inclusion
#else
FUNCTION
The #else directive tells the translation phase of C to discard a section of source code that follows #else if the
identifier of the preceding conditional inclusion directive is nonzero.
The #if, #elif, #ifdef, or #ifndef directive may precede the #else directive.
SYNTAX
#else new-line group
EXAMPLE
#define ON
#ifdef ON
.
.
.
#else
.
.
.
#endif
EXPLANATION
In the above example, the identifier “ON” has been defined with the #define directive. Thus, the source code
between #ifndef and #endif will be translated. If the identifier “ON” has never been defined, the source code
between #else and #endif will be translated.
User’s Manual U14872EJ1V0UM
147