TAL Reference Manual

TAL Reference Manual526371-001
6-1
6 Simple Variables
A simple variable is a single-element data item of a specified data type. After you
declare a simple variable, you can use its identifier in statements to access or change
the data contained in the variable. You must declare variables before you use them to
access data.
This section defines the syntax for declaring simple variables. The declaration
determines:
The kind of values the simple variable can represent
The amount of storage the compiler allocates for the variable
The operations you can perform on the variable
The byte or word addressing mode of the variable
The direct or indirect addressing mode of the variable
The
TAL Programmer’s Guide describes:
How the compiler allocates storage for simple variables
How you access the variables
Simple Variable Declaration
The simple variable declaration associates an identifier with a single-element data item
and optionally initializes it.
type
is any data type described in Section 3, Data Representation.
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:
,
initialization
;
:=
identifiertype
VST0601.vsd