|
VMS Help COBOL, miscellaneous_topics, literals, hexadecimal_literals *Conan The Librarian |
A hexadecimal literal (a HP extension to nonnumeric literals) is
a character string of 2 to 256 hexadecimal digits. It is delimited on
the left by the separator 'X' (or 'x') immediately followed by a
quotation mark (") or apostrophe ('); on the right it is delimited by a
matching quotation mark or apostrophe. The character string consists
only of pairs of hexadecimal digits representing a value ranging from
00 to FF; hence, only the characters '0' through '9', 'A' through 'F',
and 'a' through 'f' are valid.
The value of a hexadecimal literal is the composite value of the paired
hexadecimal representations. The compiler truncates hexadecimal
literals to a maximum of 128 hexadecimal representations (pairs of
hexadecimal digits).
A hexadecimal literal can be used interchangeably wherever a nonnumeric
literal can appear in HP COBOL syntax. (Note that hexadecimal
literals cannot be used as operands in arithmetic statements.)
|
|