COBOL Manual for TNS/E Programs (H06.03+)

Language Elements
HP COBOL Manual for TNS/E Programs520347-003
3-21
Literals
When you use a figurative constant whose source form does not include the word
ALL with a DISPLAY, STRING, STOP, or UNSTRING statement, the compiler
generates exactly one character.
When you use a figurative constant whose source form does include the word ALL,
there are two possibilities:
°
If a nonnumeric or national literal follows the word ALL, the compiler generates
a string having the length and value of the literal.
°
If a nonnumeric or national literal does not follow the word ALL, the compiler
generates a string of exactly one instance of the character represented by the
reserved word (figurative constant) or the symbolic character that follows the
word ALL.
The length of a figurative constant in a concatenation expression is one.
The result of associating a figurative constant that represents a nonnumeric value with
a numeric or numeric-edited data item is defined only when the string the compiler
generates from the figurative constant contains only digit characters. In this case, the
generated nonnumeric value has the appearance of an integer whose length (in terms
of the number of digits it contains) is the same as the length of the associated data
item.
Table 3-5. Figurative Constants (page 1 of 2)
Figurative Constant * What It Represents
ZERO[[E]S] One or more of the character zero (0), depending on the context
SPACE[S] One or more spaces, depending on the context
HIGH-VALUE[S] One or more of the character that has the highest position in the
program collating sequence, except in the SPECIAL-NAMES
paragraph, where it represents the character that has the
highest position in the ASCII character set (the 256th character,
which is all binary ones) or in the national character set (default
is hexadecimal FFFF)
LOW-VALUE[S] One or more of the character that has the lowest position in the
program collating sequence, except in the SPECIAL-NAMES
paragraph, where it represents the character that has the lowest
position in the ASCII character set (the first character, the NUL,
which is all binary zeros) or in the national character set (default
is hexadecimal 0000)
QUOTE[S] One or more of the character quotation mark (")
You cannot use either of these words instead of quotation marks
to enclose a nonnumeric literal.
symbolic-character One or more of the character specified as the value of
symbolic-character in the SYMBOLIC CHARACTERS
clause of the SPECIAL-NAMES paragraph
* Singular and plural forms are equivalent and can be used interchangeably.