#undefine

Undefine a constant for the scope of the constant declaration.

#undefine  Constant

Parameters

Constant—constant name

Description

The #undefine directive makes the specified constant unavailable during compilation for the current scope. For example, a constant undefined within a scope block (initiated by a #startdefine directive) will be undefined for the rest of the block until the corresponding #enddefine statement. If it has been defined at higher level, it becomes available again.

You can use #undefine to ignore a constant inherited from another object, such as a modeled entity or modeled component.

#undefine

The following example makes the constant MYCONSTANT unavailable, resulting in a warning during compilation if MYCONSTANT exists:

#undefine MYCONSTANT
#ifdefined MYCONSTANT
   #warning Constant MYCONSTANT exists
#endif

After compilation, no message will be generated.

Related Topics