pTAL Reference Manual (H06.08+)

Simple Variables
HP pTAL Reference Manual523746-006
7-3
Specifying Simple Variable Address Types
width
For INT, REAL, and UNSIGNED data types, the value in parentheses is a
constant expression specifying the width, in bits of the variable. The constant
expression can include LITERALs and DEFINEs. The result of the constant
expression must be one of the following values:
identifier
is the identifier of the simple variable, specified in the form described in Section 2,
Language Elements.
initialization
is an expression that represents the value to store in identifier. The default
number base is decimal. The kind of expression you can specify depends on the
scope of the simple variable:
For a global simple variable, use a constant expression.
For a local or sublocal simple variable, use any arithmetic expression including
variables.
You can initialize simple variables of any data type except UNSIGNED. For more
information about initializing a simple variable, see the following subsections.
Specifying Simple Variable Address Types
The address type of a simple variable is the same as the address type of a pointer to
data of the same object data type as the simple variable, as in the following examples:
INT .j; ! A pointer: address type is WADDR
INT i; ! A simple variable: address type is WADDR
Data Type Prefix width in bits
INT 16, 32, or 64
REAL 32 or 64
UNSIGNED
(simple variable, parameter, or function result)
a value in the range 1 through 31
UNSIGNED (array) 1, 2, 4, or 8