TAL Reference Manual
Language Elements
TAL Reference Manual—526371-001
2-6
Variables
Variables
A variable is a symbolic representation of data. It can be a single-element variable or a
multiple-element variable. You use variables to store data that can change during
program execution.
The compiler does not automatically initialize variables. Therefore, before you access
data stored in an a variable, either:
•
Initialize the variable with a value when you declare the variable
•
Assign a value to the variable after you declare the variable. Table 2-5 summarizes
variables.
Symbols
Symbols indicate indirection, address bases, and delimiters.
Decimal
47
Binary
%B101111
Octal
%57
Hexadecimal
%H2F
Table 2-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 a memory address, usually of a simple
variable or an 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