CONSTANT

Declares a constant for use in the program.

Syntax:

>>-.---.-CONSTANT-const-name-.-(numeric-lit)--.-><
   +-/-+                     +-"alphanum-lit"-+

Parameters:

const-name Data-name. The constant's name.
numeric-lit Numeric literal. The constant's value. Must be zero or a positive integer.
alphanum-lit Alphanumeric literal. The constant's value.

Properties:

Default: Not set
Phase: Syntax check
$SET: Any

Comments:

The effect is as if the constant const-name had been defined in the program in a level-78. Its value is that given in the parentheses or quotation marks. If parentheses are used, the constant is of category numeric; if quotation marks are used it is of category alphanumeric. It is permissible to enclose the const-name and numeric-lit or alphanum-lit pairing in parentheses.

To declare several figurative constants using this feature, use the CONSTANT directive repeatedly.

      $set CONSTANT BBC "British Broadcasting Corporation"
      $set CONSTANT EXP_DATE (2024)
       display BBC.
       display EXP_DATE.