Show: Delphi C++
Display Preferences

#pragma defineonoption and #pragma undefineonoption

From RAD Studio
Jump to: navigation, search

Go Up to Pragma Directives Overview Index

Syntax (See Pseudo-grammar)

#pragma defineonoption MACNAME OPT [OPT ...]
#pragma undefineonoption MACNAME OPT [OPT ...]

where MACNAME is a name to define or undefine, and OPT are any command line switches.

Description

The pragma #pragma defineonoption defines a macro name when specified options are set. The macro name is defined if all the switches are turned on, either from the command line or through a pragma.

The pragma #pragma undefineonoption undefines a macro name when specified options are set.

For instance, the following pragma

#pragma defineonoption DEBUG -v

results in the macro DEBUG being defined when the option -v is set.

In contrast, this pragma

#pragma undefineonoption DEBUG -v

results in the macro DEBUG being undefined when the option -v is set.

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance