TAL Reference Manual
LITERALs and DEFINEs
TAL Reference Manual—526371-001
5-3
DEFINE Declaration
3. This example specifies two of eight numeric constants; the compiler supplies the
remaining constants:
LITERAL d, -- The compiler assigns 0
e, -- The compiler assigns 1
f, -- The compiler assigns 2
g = 0,
h, -- The compiler assigns 1
i = 17,
j, -- The compiler assigns 18
k; -- The compiler assigns 19
4. This example uses a LITERAL identifier in an array declaration:
LITERAL length = 50; !Length of array
INT buffer[0:length - 1]; !Array declaration
5. This example uses 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!;
DEFINE Declaration
A DEFINE declaration associates an identifier (and parameters if any) with text.
VST0502.vsd
=
param-
name
identifier
DEFINE
(
,
#
define-
body
,
)
;