TAL Programmer's Guide

Operands
Using Expressions
096254 Tandem Computers Incorporated 5–7
An INT(32) expression can include INT(32) and UNSIGNED(17–31) operands.
The system treats UNSIGNED(17–31) operands as if they were 32-bit values. It
places an UNSIGNED(17–31) operand in the right bits of a doubleword and sets
the unused left bits to 0, with no sign extension. For example, for an
UNSIGNED(29) operand, the system fills the three leftmost bits of the doubleword
with zeros.
In all other cases, if the data types do not match, use type transfer functions (described
in the TAL Reference Manual) to make them match.
Variables A variable is a symbolic representation of an item or a group of elements. You use
variables to store data that can change during program execution. Table 5-5 lists the
kinds of variables you can declare.
Table 5-5. Variables
Variable Description
Simple variable A variable that contains one element of a specified data type
Array A variable that contains multiple elements of the same data type
Structure A variable that can contain variables of different data types
Substructure A structure nested within a structure or substructure
Structure data item A simple variable, array, simple pointer, substructure, or structure pointer
declared in a structure or substructure; also known as a structure field
Simple pointer A variable that contains the memory address, usually of a simple variable
or array element, which you can access with this simple pointer
Structure pointer A variable that contains the memory address of a structure, which you
can access with this structure pointer
Constants A constant is a value you can store in a variable, declare as a LITERAL, or use as part
of an expression. Constants can be numbers or character strings. The kind and size of
constants a variable can accommodate depend on the data type of the variable.
Examples are:
255 !Integer number
1.02E12 !Floating-point number
2.5F !Fixed-point number
"xyz" !Character string
2 * 5 !Constant expression
The following subsections describe numeric constants (integer, fixed-point, and
floating-point) and character string constants.
Integer Constants
Integer constants include STRING, INT, INT(32), and FIXED(0) numbers.
Integer constants can be in binary, octal, decimal, or hexadecimal base. Decimal is the
default number base. Specify the base as shown in Table 5-6.