<declaration list>
┌◄───────────────────┐ ──┴─<declaration>── ; ─┴───────────────────────────────────────────────┤
Explanation
Declarations define constants, variables, subroutines, and global data specifications.
Declarations of variables can also include initial value assignments. The following types of variables are available in WFL: BOOLEAN, INTEGER, REAL, STRING, FILE, and TASK. For details about the declarations available in WFL, refer to Declarations.
All declarations for the job must precede all statements in the job, and the declarations in a subroutine must precede all the statements in that subroutine.
More than one declaration can appear on a line, as long as each declaration is followed by a semicolon (;).
Example
The following job segment illustrates the use of declarations:
CONSTANT DEBUG = FALSE;
BOOLEAN TFVAL,
SUBTVALU;
FILE FILE1(TITLE=(ODCOM)FIXIT ON PACK);
INTEGER INTVAL := 43;
REAL RLVAL := 19.67,
RLVAL2 := 16.8;
STRING STRNGVL := "Test Run";
TASK DOUBAT (PRIORITY=75,INFILE(TITLE=(WALLY)DATA/SAVER));
DATA INPUT/PREP
43
69
128
? % End of data
SUBROUTINE PROVIT;
BEGIN
RUN (RAJA)DATA/PREP(TFVAL,INTVAL,STRNGVL,RLVAL);
FILE INPUT (TITLE=INPUT/PREP,KIND=READER);
END PROVIT;
