Task Variables

Task variables can be included in the COMPILE statement in either of two places. The position determines whether a task variable is associated with the compilation or the execution of the program. The same task variable cannot be assigned to both the compilation and execution, because these are separate tasks.

A task identifier included after the object code file title associates a task variable with the execution of the object code file. This task identifier is not used if the disposition of the COMPILE statement does not cause the object code file to be executed. Because this is usually a programming error, a warning is given to indicate that the task identifier is not used.

A task identifier included after the compiler name or compiler title associates a task variable with the compilation of the object code file.

The task state of the task variables included in the COMPILE statement can be interrogated later to find out if the compilation and execution of the program were successful.

Example

The following example includes task variables with COMPILE statements:

COMPILE (RAS)OBJECT/ITAL [TRUN] WITH ALGOL [TCOMP] LIBRARY GO;
   COMPILER FILE CARD (TITLE = (RAS)ITAL, KIND = DISK);
IF TCOMP ISNT COMPILEDOK THEN
   ABORT "UNSUCCESSFUL COMPILE OF OBJECT/ITAL";
IF TRUN ISNT COMPLETEDOK THEN
   ABORT "RUN-TIME ERROR IN OBJECT/ITAL";