Undefining a macro

Un-defines a preprocessor macro.

Syntax

&undef identifier
  1. identifier is a preprocessor constant.

Usage

If a macro is redefined without having been undefined previously, the preprocessor issues a warning and replaces the existing definition with the new one. First un-define a macro with the &undef directive.

Source: File A
&define HELLO "hello"
DISPLAY HELLO
&undef HELLO
DISPLAY HELLO
Result:
& 1 "A"

DISPLAY "hello"
DISPLAY HELLO
Note: It is also possible to undefine a macro with the -U command line option of compilers. However, predefined macros can't be undefined with this option.