COBOL Manual for TNS and TNS/R Programs

Language Elements
HP COBOL Manual for TNS and TNS/R Programs522555-006
3-6
Comments
Comments
All characters appearing within a comment-entry or comment line are a part of that
entity and are never interpreted as separators in that context.
Nonnumeric and National Literals
Characters appearing within a character-string that represents a nonnumeric or
national literal are components of its value and are never interpreted as separators.
Numeric Literals and PICTURE Character-Strings
Several punctuation characters (comma, period, left parenthesis, right parenthesis) are
also defined as characters available for the formation of numeric literals and PICTURE
character-strings. They are not separators in these contexts but instead represent a
part of that language element; however, an exception exists if the apparent last
character of such a character-string is a period or comma immediately followed by a
space. In this case, the period or comma is always interpreted as part of the separator
following the character-string, and not as the last character of the numeric literal or
PICTURE character-string.
Character-Strings
A character-string consists of one or more characters that form:
COBOL Words
Literals
PICTURE Character-Strings
Comments
Most character-strings are limited to certain characters, but nonnumeric literals (except
for hexadecimal literals beginning with X ) and comments can contain any characters.
Character-strings and separators form the text of COBOL source programs.