IFNDEF - Execute If Symbol has not Been Defined

MPASM Assembler

IFNDEF - Execute If Symbol has not Been Defined

Syntax

ifndef <label>

Description

If <label> has not been previously defined, or has been undefined by issuing an #undefine directive, then the code following the directive will be assembled. Assembly will be enabled or disabled until the next matching else or endif directive is encountered.

Example

#define testing1 ; set testing on

:

#undefine testing1 ; set testing off

ifndef testing ; if not in testing mode

: ; execute this path

endif

end ; end of source

See Also

#DEFINE #UNDEFINE ELSE ENDIF IFDEF


Microchip Technology Inc.
Microchip's Web Site
Voice: (480) 792-7200
Fax: (480) 899-9210
Microchip's E-mail Address
PreviousNext