pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

You access a LITERAL constant by using its identifier in declarations and statements.
The compiler does not allocate storage for LITERAL constants. It substitutes the constant at each
occurrence of the identifier.
Example 23 Literal Declarations
All constants specified:
LITERAL true = -1,
false = 0,
buffer_length = 80,
table_size = 128,
table_base = %1000,
entry_size = 4,
timeout = %100000D,
CR = %15,
LF = %12;
All constants supplied by compiler:
LITERAL a, ! Compiler assigns 0
b, ! Compiler assigns 1
c; ! Compiler assigns 2
Two constants specified, six supplied by compiler:
LITERAL d, ! Compiler assigns 0
e, ! Compiler assigns 1
f, ! Compiler assigns 2
g = 0,
h, ! Compiler assigns 1
i = 17,
j, ! Compiler assigns 18
k; ! Compiler assigns 19
LITERAL identifier in array declaration:
LITERAL length = 50; ! Length of array
INT buffer[0:length - 1]; ! Array declaration
LITERAL identifiers in subsequent LITERAL declarations:
LITERAL number_of_file_extents = 16;
LITERAL file_extent_size_in_pages = 32;
LITERAL file_size_in_bytes = (number_of_file_extents '*'
file_extent_size_in_pages) * 2048D ! bytes per page !;
Declaring DEFINEs
A DEFINE declaration associates an identifier (and optional parameters) with text.
item-list
identifier
is the identifier of the DEFINE.
98 LITERALs and DEFINEs