&GLOBAL-DEFINE preprocessor directive
Globally defines a compile-time constant (preprocessor name).
Syntax
preprocessor-name
definition
ExamplesIn this example, the preprocessor name
MAX-EXPENSE
is defined as the text string "5000":
Wherever the reference
{&MAX-EXPENSE}
appears in the source code, the preprocessor substitutes the text string “5000". For example, the preprocessor changes this line of code:
To this line:
Notes
- You must place the &GLOBAL-DEFINE directive at the beginning of a line, preceded only by blanks, tab characters, or comments (
/*
comment
*/
). The preprocessor trims all leading and trailing spaces fromdefinition
.- The syntax of the &GLOBAL-DEFINE and &SCOPED-DEFINE directives are identical but these directives are used differently.
- If a duplicate &GLOBAL-DEFINE directive is used with out first
See also{ } Preprocessor name reference, &SCOPED-DEFINE preprocessor directive, &UNDEFINE preprocessor directive, DEFINED preprocessor function
OpenEdge Release 10.2B
|