pTAL Reference Manual (H06.08+)

LITERALs and DEFINEs
HP pTAL Reference Manual523746-006
6-3
Declaring DEFINEs
Declaring DEFINEs
A DEFINE declaration associates an identifier (and optional parameters) with text.
item-list
identifier
is the identifier of the DEFINE.
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 !;
Example 6-1. Literal Declarations (page2of2)
DEFINE
item-list
;
,
VST019.vsd
identifier
param-list
=
define-body
#
VST995.vsd