COBOL Manual for TNS/E Programs (H06.03+)
Language Elements
HP COBOL Manual for TNS/E Programs—520347-003
3-18
Literals
•
The value of a literal is the ordered sequence of characters in its representation
(excluding the delimiting quotation marks and interpreting a pair of contained
quotation marks as a single quotation mark character). The literal represents a
data item of the alphanumeric category whose value is the value of the literal.
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.
Example 3-5. Nonnumeric Literals
"THIS IS A NONNUMERIC LITERAL"
"This is ANOTHER one. "" IS ONE EMBEDDED QUOTATION MARK"
"You don't need to double apostrophes."
". , ; : ( ) == are not separators in literals."
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










