English
Language : 

CC78K0S Datasheet, PDF (142/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 9 PREPROCESSING DIRECTIVES (COMPILER DIRECTIVES)
9.1 Conditional Inclusion
Conditional inclusion skips part of a source file according to the value of a constant expression. If the value of the
constant expression specified by a conditional inclusion directive is 0, the statements that follow the directive are not
translated (compiled). The sizeof operator, cast operator, or an enumerated type constant cannot be used in the
constant expression of any conditional inclusion directive.
Conditional inclusion directives include #if, #elif, #ifdef, #ifndef, #else, and #endif.
In preprocessing directives, the following unary expressions called defined expressions may be used.
defined identifier
defined (identifier)
The unary expressions return 1 if the identifier has been defined with the #define preprocessing directive and 0 if
the identifier has never been defined or its definition has been canceled.
[Example]
In this example, the unary expression returns 1 and compiles between #if and #endif because SYM has been
defined (for the explanation of #if through #endif, refer to the explanations in the following pages).
#define SYM 0
#if defined SYM
.
.
.
#endif
142
User’s Manual U14872EJ1V0UM