TAL Programmer's Guide
Operands
Using Expressions
096254 Tandem Computers Incorporated 5–9
FIXED(0). FIXED(0) numeric constants are discussed under “Fixed-Point Constants,”
described next.
Fixed-Point Constants
A fixed-point constant is type FIXED and is a signed 64-bit fixed-point number. The
range of a FIXED constant is determined by its fpoint. For example, the ranges for
FIXED(0) and FIXED(2) are:
fpoint Range
FIXED(0) –9,223,372,036,854,775,808 through 9,223,372,036,854,775,807
FIXED(2) –92,233,720,368,547,758.08 through 92,233,720,368,547,758.07
Fixed-point numbers except FIXED(0) must be in decimal base. A decimal fixed-point
number can include a fractional part preceded by a decimal point. Append F to
decimal, octal, or binary FIXED numbers. Append %F to hexadecimal numbers. Here
are examples:
1200.09F !Decimal base; FIXED(2)
0.1234567F !Decimal base; FIXED(7)
239840984939873494F !Decimal base; FIXED(0)
-10.09F !Decimal base; signed FIXED(2)
%B1010111010101101010110F !Binary base; FIXED(0)
-%765235512F !Octal base; signed FIXED(0)
%H298756%F !Hexadecimal base; FIXED(0)
Floating-Point Constants
A REAL or REAL(64) numeric constant is a signed floating-point number in the range
± 8.6361685550944446 * 10
-78
through ±1.15792089237316189 * 10
+77
.
A REAL numeric constant is a 32-bit value that is precise to approximately seven
significant digits.
A REAL(64) numeric constant is a 64-bit value that is precise to approximately 17
significant digits.
The format of a floating-point constant includes an integer part, a fractional part
suffixed by E for a REAL constant or L for a REAL(64) constant, and an exponent as
follows:
356
-30.3E-2
Exponent
Fractional part
Integer part