COBOL Manual for TNS and TNS/R Programs
Language Elements
HP COBOL Manual for TNS and TNS/R Programs—522555-006
3-20
Literals
Hexadecimal Nonnumeric 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. A
hexadecimal nonnumeric literal can have at most 320 hexadecimal digits (160
pairs), excluding the delimiting quotation marks.
A hexadecimal nonnumeric literal can appear anywhere that a simple nonnumeric
literal can appear.
National Literals
A national literal is used for those spoken languages not represented by roman letters
and Arabic numbers. An example is the Japanese Kanji alphabet. To use national
literals, you must have a special terminal and a special keyboard.
As with other types of literals, the character-string of a national literal has the value of
the sequence of its characters. Each character is represented internally by 2 bytes.
char
is any character in the national character set, including a punctuation character. A
national literal can have at most 160 characters, excluding the delimiting quotation
marks.
Example 3-6. Hexadecimal Nonnumeric Literals
X"00"
X"0F"
X"0123456789ABCDEF"
X"1003c55b"
"
X
hex-digit hex-digit
"
ns ns
ns
ns
ns
VST613.vsd
"
char
"
N
n
VST745.vsd