pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Table 18 Data Types (continued)
Values the Data Type Can Represent
Storage Unit
1
Data Type
64-bit floating-point number in the same range as data type REAL but
precise to approximately 16.5 significant decimal digits.
QuadruplewordREAL(64)
UNSIGNED(1-15) and UNSIGNED(17-31): Unsigned integer in the range
0 through (2n - 1)
n-bit fieldUNSIGNED
UNSIGNED(16):
Unsigned integer in the range 0 through 65,535
Signed integer in the range -32,768 through 32,767
UNSIGNED simple variable: The bit field can be 1 to 31 bits.
UNSIGNED array: The element bit field can be 1, 2, 4, or 8 bits.
1
Table 17 (page 46) describes storage units.
2
INT and INT(16) are the same type.
3
REAL and REAL(32) are the same type.
4
FIXED, FIXED(0), and INT(64) are the same type.
Topics:
Specifying Data Types (page 47)
Data Type Aliases (page 48)
Operations by Data Type (page 48)
Specifying Data Types
The syntax for specifying the data type in a variable declaration is:
width
is a constant expression that specifies the width, in bits, of the variable. The value of width
must be appropriate for the data type (see Example 5 (page 48)):
Value of widthData Type
16INT (16)*
32INT (32)
64INT (64)*
32REAL(32)*
64REAL(64)
In the range 1 through 31UNSIGNED(n )
* Data type alias (see Data Type Aliases (page 48))
Data Types 47