TAL Programmer's Guide

Simple Variables by Data Type
Using Simple Variables
6–12 096254 Tandem Computers Incorporated
Stored Forms
The following examples compare the stored form of values having various fpoints:
FIXED(-3) a := 643000F; !Stored as 000000643
FIXED(-3) b := .643F; !Stored as 000000000
FIXED c := 643000F; !Stored as 000643000
FIXED d := .643F; !Stored as 000000000
FIXED(3) e := 643000F; !Stored as 643000000
FIXED(3) f := .643F; !Stored as 000000643
Number Bases
The following initialization examples illustrate different number bases:
FIXED a := 239840984939873494F;
!Decimal number
FIXED(3) b := %B1010111010101101010110F;
!Binary number
FIXED(5) c := %765235512F; !Octal number
FIXED d := %H298756F; !Hexadecimal number
Storage Allocation
The compiler allocates a quadrupleword for each FIXED variable. It allocates
character string and numeric initialization values as follows:
FIXED char := "A";
?
?
?
FIXED num := %H23F;
359
%H23F
"A" ?
You can initialize a FIXED variable with a character string when you declare the
variable (as shown in the preceding example), but you cannot assign a character string
to such a variable.