COBOL Manual for TNS and TNS/R Programs

Language Elements
HP COBOL Manual for TNS and TNS/R Programs522555-006
3-18
Literals
Hexadecimal Numeric Literals
hex-digit
is one of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, a, b, c, d, e, f.
The maximum number of hex-digits in a hexadecimal numeric literal is 16 (eight
pairs).
A hexadecimal numeric literal is considered an unsigned integer. It can appear
anywhere that a decimal numeric literal can appear.
Example 3-2. Integer Decimal Numeric Literals
+601
-234116
0
15
1234. , (an integer followed by a period separator and a comma
separator)
Example 3-3. Noninteger Decimal Numeric Literals
+601.1
89.6
0.0051
-.1
1234., (a noninteger followed by a comma separator)
Example 3-4. Hexadecimal Numeric Literals
H"00"
H"0F"
H"0123456789ABCDEF"
H"1003c55b"
VST612.vsd
"
H
hex-digit hex-digit
"
nsns ns
ns
ns