RAD Studio |  |

#pragma defineonoption and #pragma undefineonoption

Syntax

Copy Code

    #pragma defineonoption <macroname>
            <switches>

Copy Code

    #pragma undefineonoption <macroname>
            <switches>

where <macroname> is a name to define or undefine, and <switches> 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 in 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

Copy Code

    #pragma defineonoption DEBUG -v

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

In contrast, this pragma

Copy Code

    #pragma undefineonoption DEBUG -v

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

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!