Use preprocessor names and directives
- Last Updated: May 29, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
All built-in preprocessor names are supported in classes. These names include
BATCH-MODE, FILE-NAME,
LINE-NUMBER, OPSYS, PROCESS-ARCHITECTURE, SEQUENCE and
WINDOW-SYSTEM. The following SpeedScript built-in
preprocessor names are also supported: DISPLAY, OUT, OUT-FMT, OUT-LONG and WEBSTREAM.
All preprocessor directives, such as &IF, &GLOBAL-DEFINE,
and &SCOPED-DEFINE, can be used in classes
and behave as they do in procedures. &SCOPED-DEFINE defines
a compile-time constant or preprocessor name that is in scope from
the line that defines it, until the end of the source file that
defines it (which may be a class, procedure, or include file). &GLOBAL-DEFINE defines
a compile-time constant that is in scope from the line that defines
it through to the end of the compilation unit. In the case of a
class, this means until the end of the class definition, including
any referenced include files.
There is no preprocessor directive that defines a compile-time constant that is in scope for the entire class hierarchy.