Used to assign a text value to an identifier or a macro.
Syntax
#define identifier { text }
#define macro( { identifier { , identifier }... } ) { text }
Notes
identifier
|
the identifier to define.
|
macro
|
the macro to define.
|
text
|
the text value to assign to the specified identifier or macro.
|
If the second form is used then the parameters are place holders
for values to be substituted. Each parameter in the list must be unique, each
parameter can appear more than once in macro definition and each parameter
can appear in any order with in the macro definition. The number of arguments
in the call must match the number of parameters in the macro definition.
Example
#define VERSION "1.0.0"
#define MAX(a,b) ((a>=b)?a:b)
|