English
Language : 

CC78K4 Datasheet, PDF (138/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 9 PREPROCESSING DIRECTIVES (COMPILER DIRECTIVES)
(1) #if directive
Conditional Translation Directives
#if
FUNCTION
The #if directive tells the translation phase of C to skip (discard) a section of source code if the value of the
constant expression is 0.
SYNTAX
#if constant expression line feed group
EXAMPLE
#if FLAG == 0
:
#endif
EXPLANATION
In the above example, the constant expression “FLAG == 0” is evaluated to determine whether a set of
statements (i.e., source code) between #if and #endif is to be used in the translation phase. If the value of
“FLAG” is nonzero, the source code between #if and #endif will be discarded. If the value is zero, the source
code between #if and #endif will be translated.
138
User’s Manual U15556EJ1V0UM