&SCOPED-DEFINE preprocessor directive
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
&SCOPED-DEFINE preprocessor directive
Defines a compile-time constant (preprocessor name) non-globally.
Syntax
|
- preprocessor-name
- The preprocessor name (compile-time constant) that you supply. ABL reserved keywords are allowed, but cannot be used in preprocessor expressions.
- definition
- A string of characters (or preprocessor references that evaluate to a
string of characters) whose content the preprocessor substitutes for preprocessor-name during compilation. If definition is
longer than on line, a tilde (
~) at the end of a line indicates continuation to the next line.
Notes
- You must place the
&SCOPED-DEFINEdirective at the beginning of a line, preceded only by blanks, tab characters, or multi-line comments (/*comment*/). The preprocessor trims all leading and trailing spaces from definition. - The syntax of the
&GLOBAL-DEFINEand&SCOPED-DEFINEdirectives are identical but these directives are used differently. - The compiler removes /* Multi-line comments */ on lines of ABL code with
preprocessor directives. To retain comments, use // Single-line comments or
escape the multi-line comment using a tilde
(
~). For example,&SCOPED-DEFINE VAR3 DEF VAR xpos AS INT. /~* column position of fill-in *~/.
See also
{ } Preprocessor name reference, &GLOBAL-DEFINE preprocessor directive, &UNDEFINE preprocessor directive, DEFINED preprocessor function