Ifdef, #Ifndef - Panasonic PanaXSeries MN1030 Series User Manual

Panasonic microcomputer user's manual
Table of Contents

Advertisement

10.4.1 #ifdef, #ifndef

Syntax
Syntax for #ifdef
#ifdef
[#else
#endif
Functional description
#ifdef
If the identifier has been defined by a #define directive before the #ifdef statement, block1 will be
assembled. If it has not been defined and an #else directive has been coded, block2 will be assembled.
#ifndef
If the identifier has not been defined by a #define directive before the #ifndef statement, block1 will be
assembled. If it has been defined and an #else directive has been coded, block2 will be assembled.
Coding rules
These directives can be used within macro definitions and wherever machine language instructions can
be coded.
If an identifier is defined after #ifdef or #ifndef, it will be considered undefined.
Identifiers can be specified by the D option when the assembler is started, even if they are not defined
with #define directives.
identifier
block1
block2]
Chapter 10 Writing Assembler Control Statements
Syntax for #ifndef
#ifndef
identifier
block1
[#else
block2]
#endif
Conditional Assembly 191

Advertisement

Table of Contents
loading

Table of Contents