#define Directive

Syntax: #define <variable_name>

The #define directive may appear anywhere inside the code. It need not appear at the beginning of a line. The directive and the variable name are case sensitive.

This directive creates (i.e. defines) a special internal variable which has the specified name. You then can test whether the variable has been defined (#ifdef) and you can undefine the variable.

Notes:

  • It is harmful to undefine a variable which has not been defined before.
  • It is harmful to define a variable twice.
  • Variable names defined by the #define directive have nothing to do with local variables or parameters, even if they have the same name!

#define