The #define command is used for macro substitution. Redefinition of a macro will result in a compiler warning.

 #define TurnTime 3000 // 3 seconds

Macros are normally restricted to one line because the newline character at the end of the line acts as a terminator. However, you can write multiline macros by instructing the preprocessor to ignore the newline character. This is accomplished by escaping the newline character with a backslash ('\'). The backslash character must be the very last character in the line or it will not extend the macro definition to the next line. The code sample below shows how to write a multi-line preprocessor macro.

 #define square(x, result) \
   mul result, x, x 

The #undef directive may be used to remove a macro's definition.

Generated by  doxygen 1.6.2