Kbase P67982: What is the difference between &global-define and &scope-define ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/11/2008 |
|
Status: Verified
GOAL:
What is the difference between &global-define and &scope-define ?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
Every preprocessor name that is defined has a specific scope. The scope, of a preprocessor name, is the area within its compilation unit where it can be accessed, or referenced, the by the preprocessor &name.
The scope of a preprocessor name is determined by:
1.) where it is defined within the compilation unit and
2.) whether it is defined with the &GLOBAL-DEFINE or &SCOPED-DEFINE directive.
The syntax of the &GLOBAL-DEFINE and &SCOPED-DEFINE directives are identical but these directives are used differently:
&GLOBAL-DEFINE preprocessor-name definition
&SCOPE-DEFINE preprocessor-name definition
A preprocessor name defined with the &GLOBAL-DEFINE directive is globally defined;
a preprocessor name defined with the &SCOPED-DEFINE directive is nonglobally defined.
For more information, please refer to the chapter on "The Preprocessor" in the Progress Programming Handbook.