{ &preprocessor-name }
|
The preprocessor name . . .
|
Expands to an unquoted string . . .
|
BATCH-MODE
|
Equal to "yes" if the Batch (-b) startup parameter was used to start the client session. Otherwise, it expands to "no".
|
FILE-NAME
|
That contains the name of the file being compiled.1 If you want only the name of the file as specified in the { } Include File Reference, the RUN statement, or the COMPILE statement, use the argument reference {0}.
|
LINE-NUMBER
|
That contains the current line number in the file being compiled. If you place this reference in an include file, the line number is calculated from the beginning of the include file.
|
OPSYS
|
That contains the name of the operating system on which the file is being compiled. The OPSYS name can have the same values as the OPSYS function. The possible values are "UNIX" and "WIN32".2
|
PROCESS-ARCHITECTURE
|
That contains the bit value of the AVM process on which the file is compiled. The possible values include "32" and "64".3
|
SEQUENCE
|
Representing a unique integer value that is sequentially generated each time the SEQUENCE preprocessor name is referenced. When a compilation begins, the value of {&SEQUENCE} is 0; each time {&SEQUENCE} is referenced, the value increases by 1. To store the value of a reference to SEQUENCE, you must define another preprocessor name as {&SEQUENCE} at the point in your code you want the value retained.
|
WINDOW-SYSTEM
|
That contains the name of the windowing system in which the file is being compiled. The possible values include "MS-WINDOWS", "MS-WIN95", "MS-WINXP", and "TTY".4
|
DEFINE VARIABLE hProcess AS INTEGER NO-UNDO.
DEFINE VARIABLE Wow64Process AS INTEGER NO-UNDO. DEFINE VARIABLE resultValue AS INTEGER NO-UNDO. &IF {&PROCESS-ARCHITECTURE} = 64 &THEN /* 64-bit processes always run on 64-bit Windows */ MESSAGE "64-bit process running on 64-bit Windows". &ELSE /* If a 32-bit process is running under WOW64 it must be ** running on 64-bit Windows. Otherwise, it is running on ** 32-bit Windows. */ RUN GetCurrentProcess(OUTPUT hProcess). RUN IsWow64Process(hProcess, INPUT-OUTPUT Wow64Process, OUTPUT resultValue). MESSAGE "32-bit process running on " + (IF Wow64Process > 0 THEN "64" ELSE "32") + "-bit Windows". &ENDIF PROCEDURE GetCurrentProcess EXTERNAL "kernel32.dll": DEFINE RETURN PARAMETER hProcess AS LONG. END. PROCEDURE IsWow64Process EXTERNAL "kernel32.dll": DEFINE INPUT PARAMETER hProcess AS LONG. DEFINE INPUT-OUTPUT PARAMETER Wow64Process AS HANDLE TO LONG. DEFINE RETURN PARAMETER resultValue AS LONG. END. |
The preprocessor name . . .
|
Expands to an unquoted string . . .
|
DISPLAY
|
DISPLAY {&WEBSTREAM}
|
OUT
|
PUT {&WEBSTREAM} UNFORMATTED
|
OUT-FMT
|
PUT {&WEBSTREAM} FORMATTED
|
OUT-LONG
|
EXPORT {&WEBSTREAM}
|
WEBSTREAM
|
STREAM WebStream
|
MESSAGE "The current operating system is" "{&OPSYS}."
VIEW-AS ALERT-BOX. |
DEFINE VARIABLE wvar AS INTEGER NO-UNDO.
DEFINE VARIABLE xvar AS INTEGER NO-UNDO. DEFINE VARIABLE yvar AS INTEGER NO-UNDO. DEFINE VARIABLE zvar AS INTEGER NO-UNDO. ASSIGN wvar = {&SEQUENCE} xvar = {&SEQUENCE}. &GLOBAL-DEFINE Last-Value {&SEQUENCE} ASSIGN yvar = {&Last-Value} zvar = {&Last-Value}. MESSAGE "wvar =" wvar SKIP "xvar =" xvar SKIP "yvar =" yvar SKIP "zvar =" zvar VIEW-AS ALERT-BOX. |
&SCOPED-DEFINE My-Name "Daniel"
{r-prprc3.i &My-Name = "David"} MESSAGE "My-Name preprocessed in r-prprc3.p is" {&My-Name} + "." VIEW-AS ALERT-BOX. |
MESSAGE "My-Name argument in r-prprc3.i is" "{&My-Name}" + "."
VIEW-AS ALERT-BOX. &SCOPED-DEFINE My-Name "Donald" MESSAGE "My-Name preprocessed in r-prprc3.i is" {&My-Name} + "." VIEW-AS ALERT-BOX |
&SCOPED-DEFINE My-Name "Donald"
MESSAGE "My-Name preprocessed in r-prprc3.i is" {&My-Name} + "." VIEW-AS ALERT-BOX. MESSAGE "My-Name argument in r-prprc3.i is" "{&My-Name}" + "." VIEW-AS ALERT-BOX. |