Syntax
#define name value
The define directive assigns the given value to the specified name. All subsequent occurrences of the name are replaced by the value.
| name | Specifies the name to be defined. This name can be any combination of letters, digits, or underscore characters which does not begin with a digit. |
| value | Specifies any integer, character string, or line of text. This value can contain another defined name, which creates a level of nested defines. You are limited to 64 levels of nested defines. |
Example
This example assigns values to the names
"NONZERO" and "USERCLASS".
#define NONZERO 1 #define USERCLASS "MyControlClass"
The Resource Compiler is capable of accepting and compiling preprocessor functions. Therefore, the following example is possible:
#define DAYS(X) #X DAYS(5) // would yield "5"
![]()
Preprocessor Directives
Preprocessor Macros
![]()
Macro
Definition and Expansion - #define
Resource Script Files
Resource Compiler - An
Overview
Resource Compiler - An
Overview