TAL Programmer's Guide
Simple Variables by Data Type
Using Simple Variables
096254 Tandem Computers Incorporated 6–7
Storage Allocation
The compiler allocates a word for each INT simple variable. Here are examples of
numeric and character string initializations:
INT int_num := %110;
INT two_chars := "AB";
%110
"A" "B"
353
For INT simple variables, a one-byte initialization behaves differently from a one-byte
assignment as follows:
If you initialize an INT variable with a one-byte character string, the compiler
allocates the character in the left byte of the word. The right byte is undefined.
If you assign a one-byte character string to the variable, at run-time the system
places it in the right byte and sets the left byte to zero. If you want the character to
be placed in the left byte, assign a two-byte character string that consists of a
character and a blank space.
The following example contrasts how the system stores a byte initialization in INT
simple variables as opposed to how the system stores a byte assignment:
"A" ?
0
"A"
"A" "
 "
354
INT il, i2;
INT i3 := "A"; !Initialize with "A"
i1 := "A"; !Assign "A"
i2 := "A "; !Assign "A" and a blank










