English
Language : 

CC78K4 Datasheet, PDF (140/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 9 PREPROCESSING DIRECTIVES (COMPILER DIRECTIVES)
(3) #ifdef directive
Conditional Translation Directives
#ifdef
FUNCTION
The #ifdef directive is equivalent to:
#if defined (identifier)
If the identifier has been defined with the #define directive, the statements between #ifdef and #endif will be
translated. If the identifier has never been defined or its definition has been canceled, the translation phase will
skip the source code between #ifdef and #endif.
SYNTAX
#ifdef identifier line feed group
EXAMPLE
#define ON
#ifdef ON
:
#endif
EXPLANATION
In the above example, the identifier “ON” has been defined with the #define directive. Thus, the source code
between #ifdef and #endif will be translated. If the identifier “ON” has never been defined, the source code
between #ifdef and #endif will be discarded.
140
User’s Manual U15556EJ1V0UM