TAL Programmer's Guide

Simple Variables by Data Type
Using Simple Variables
6–8 096254 Tandem Computers Incorporated
INT(32) Simple Variables An INT(32) simple variable can contain a signed or unsigned 32-bit integer in the
range –2,147,483,648 through 2,147,483,647, suffixed by D for decimal, octal, or binary
integers or %D for hexadecimal integers. It also can contain a character string of up to
four characters.
INT(32) a := 0D; !Decimal number
INT(32) b := -327895066D; !Decimal number
INT(32) c := %1707254361D; !Octal number
INT(32) d := %B000100101100010001010001001D;
!Binary number
INT(32) e := -%H99FF29%D; !Hexadecimal number
INT(32) f := "ABCD"; !Character string
You can initialize INT(32) simple variables with the 32-bit addresses of extended
indirect variables:
INT .EXT x_array[0:2]; !Declare X_ARRAY
INT(32) x_addr := @x_array[0]; !Declare X_ADDR; initialize
! it with address of X-ARRAY
Storage Allocation
For an INT(32) simple variable, the compiler allocates a doubleword. The compiler
allocates numeric and character string initialization values as follows:
INT(32) dbl_num := 256D;
INT(32) dbl_chars := "ABC";
355
"A" "B"
"C" ?
256D