Data Definition Language (DDL) Reference Manual (G06.24+)
SPI Tokens
Data Definition Language (DDL) Reference Manual—426798-002
7-5
TOKEN-TYPE Statement
•
The following shows the data structures DDL generates for token types in each
language:
•
DDL replaces any hyphen in a DDL name with a circumflex (^) in a TAL LITERAL
name or in a TACL STRUCT name, and with an underscore (_) in a C #define
name or in a Pascal defined constant name.
Standard SPI TOKEN-TYPE Definitions. The following guidelines apply to the
standard SPI token types:
•
SPI defines a set of standard token types. The names of standard SPI token types
have the following format:
Zsss-TYP-name
In this format, the letter Z indicates that the token type is defined by HP, sss is a
subsystem name or is SPI for a standard SPI name, and name identifies the
token type.
•
The file ZSPIDEF.ZSPIDDL on the disk volume chosen for your system contains
the DDL definitions of the standard SPI token types. To use the standard SPI
definitions, compile this file into your dictionary, using the DDL SOURCE
command. For a complete description of the standard SPI token types, see the SPI
Programming Manual and the SPI Common Extensions Manual.
•
You can use the standard token types where applicable, or you can define your
own token types. When you define a token type specifically for your own
subsystem, do not begin its name with the letter Z; this ensures that your token-
type name will not be the same as a current or future name supplied by HP.
TOKEN-TYPE Statement Examples
The following example shows the standard SPI token-type definition for simple tokens
that contain 16-bit integer values:
Language Data Structure
C #define TYPE_NAME value
COBOL 01 type-name NATIVE-2 VALUE IS value
Pascal CONST type-name = value
TACL ? Section type^name Struct
BEGIN
INT value
END;
pTAL or TAL Literal type^name = value
TOKEN-TYPE zspi-typ-int
VALUE IS zspi-tdt-int
DEF IS zspi-ddl-int.
Token name
Token data-type
Token definition
VST701.vsd