&GLOBAL-DEFINE preprocessor-name definitionA string of characters (or preprocessor references that evaluate to a string of characters) whose content the preprocessor substitutes for preprocessor-name during compilation. If the definition is longer than one line, a tilde (~) at the end of a line indicates continuation to the next line.In this example, the preprocessor name MAX-EXPENSE is defined as the text string "5000":
&GLOBAL-DEFINE MAX-EXPENSE 5000Wherever 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:
IF tot-amount <= {&MAX-EXPENSE} THEN DO:
IF tot-amount <= 5000 THEN DO:
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 from definition.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |