public class BuiltinVariable
extends java.lang.Object
As the builtin variables can be overridden using include file references, the scoping of their names is as important as of any other variable name. For this reason, all builtin variables are put into the global scope of a dictionary specified as a parameter when constructing objects of this class.
Producing values for some of the variables requires access to some information maintained by the preprocessor on a per file basis. This access is done through a reference to the Environment object.
Supported Progress 4GL built-in variables:
BATCH-MODE FILE-NAME LINE-NUMBER OPSYS SEQUENCE WINDOW-SYSTEM
Supported WebSpeed global defines:
WEBSTREAM OUT OUT-FILE OUT-STREAM OUT-FMT OUT-LONG DISPLAY END AMP LT GT QUOT
WARNING: the web-speed built-in variables are not really preprocessor built-ins in Progress. In particular, they can be re-defined as symbols when the others cannot. Although the Progress documentation calls them built-in, it these are actually implemented in include files rather than in the preprocessor/runtime. We place these implementations here as a default, but allow any webspeed or webspeed clone code to naturally override these definitions when it is preprocessed.
Modifier and Type | Class and Description |
---|---|
private static class |
BuiltinVariable.BatchMode
Produces the BATCH-MODE value.
|
private static class |
BuiltinVariable.FileName
Produces the FILE-NAME value.
|
private static class |
BuiltinVariable.LineNumber
Produces the LINE-NUMBER value.
|
private static class |
BuiltinVariable.Opsys
Produces the OPSYS value.
|
private static class |
BuiltinVariable.Sequence
Produces the SEQUENCE value, incrementing the value each time it is
referenced.
|
private static class |
BuiltinVariable.WindowSystem
Produces the WINDOW-SYSTEM value.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
AMP
SpeedScript (embedded 4GL) & definition.
|
private static java.lang.String |
DISPLAY
SpeedScript (embedded 4GL) &DISPLAY definition.
|
private static java.lang.String |
END
SpeedScript (embedded 4GL) &END definition.
|
private static java.lang.String |
GT
SpeedScript (embedded 4GL) > definition.
|
private static java.lang.String |
LT
SpeedScript (embedded 4GL) < definition.
|
private static java.lang.String |
OUT
SpeedScript (embedded 4GL) &OUT definition.
|
private static java.lang.String |
OUT_FMT
SpeedScript (embedded 4GL) &OUT-FMT definition.
|
private static java.lang.String |
OUT_LONG
SpeedScript (embedded 4GL) &OUT-LONG definition.
|
private static java.lang.String |
QUOT
SpeedScript (embedded 4GL) " definition.
|
private static java.lang.String |
WEBSTREAM
SpeedScript (embedded 4GL) &WEBSTREAM definition.
|
Constructor and Description |
---|
BuiltinVariable() |
Modifier and Type | Method and Description |
---|---|
static void |
init(ScopedSymbolDictionary sym)
Adds all WebSpeed and 4GL built-in variables to the global scope of the
given dictionary with the
Symbol.GLOBAL or
Symbol.BUILTIN as the origin respectively. |
private static final java.lang.String WEBSTREAM
private static final java.lang.String OUT_FMT
private static final java.lang.String OUT
private static final java.lang.String OUT_LONG
private static final java.lang.String DISPLAY
private static final java.lang.String END
private static final java.lang.String AMP
private static final java.lang.String LT
private static final java.lang.String GT
private static final java.lang.String QUOT
public static void init(ScopedSymbolDictionary sym)
Symbol.GLOBAL
or
Symbol.BUILTIN
as the origin respectively.sym
- Dictionary where the names of all the variables are added.