TAL Reference Manual
Data Representation
TAL Reference Manual—526371-001
3-16
Examples of Storage Formats
The system stores the parts of a floating-point constant as follows:
Examples of Storage Formats
1. For the following REAL constant, the sign bit is 0, the fraction bits are 0, and the
exponent bits contain %400 + 2, or %402:
4 = 1.0 * 2 2 stored as %000000 %000402
2. For the following REAL constant, the sign bit is 1, the fraction bits contain %.2
(decimal .25 is 2/8), and the exponent bits contain %400 + 3, or %403:
-10 = -(1.25 * 2 3 ) stored as %120000 %000403
3. For the following REAL(64) constant, the sign bit is 0, the fraction bits contain the
octal representation of .33333..., and the exponent bits contain %400 – 2, or %376:
1/3 = .33333…* 2 –2 stored as %025252 %125252 %125252 %125376
Constant Lists
A constant list is a list of one or more constants. You can use constant lists in:
•
Initializations of array declarations that are not contained in structures
•
Group comparison expressions
•
Move statements but not assignment statements
repetition-constant-list
has the form:
Data Type Sign Bit Fraction Exponent
REAL
<0> <1:22> <23:31>
REAL
<0> <1:54> <55:63>
VST0308.vsd
repetition-constant-list
constant-list-seq
repetition-constant-list[ ]