Progress
Language Reference


&GLOBAL-DEFINE Preprocessor Directive

Interfaces
OS
SpeedScript
All
All
Yes

Globally defines a compile-time constant (preprocessor name).

SYNTAX

&GLOBAL-DEFINE preprocessor-name definition 

preprocessor-name

The preprocessor name (compile-time constant) that you supply. Progress 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 the definition is longer than one line, a tilde (~) at the end of the first line indicates continuation to the next line.

EXAMPLES

In this example, the preprocessor name MAX-EXPENSE is defined as the text string “5000".

&GLOBAL-DEFINE MAX-EXPENSE 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:

IF tot-amount <= {&MAX-EXPENSE} THEN DO: 

to this line:

IF tot-amount <= 5000 THEN DO: 

NOTES

SEE ALSO

{ } Preprocessor Name Reference, &SCOPED-DEFINE Preprocessor Directive, &UNDEFINE Preprocessor Directive, DEFINED Preprocessor Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095