Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

SCREEN COBOL Source Program
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
2-8
Literals
A numeric literal can have one decimal point, which can appear anywhere within
the literal except as the last character. The absence of a decimal point indicates
that the literal is an integer.
The following examples illustrate numeric literals:
Integer numeric literals:
+601
-234116
0
15
Noninteger numeric literals:
+601.1
89.6
0.0051
-.1
Nonnumeric Literals
A nonnumeric literal is any ASCII character string enclosed in quotation marks. The
value of the literal is the string of characters between the quotation marks. The
following rules apply to nonnumeric literals:
Nonnumeric literals can have a maximum length of 120 characters, not including
the surrounding quotation marks.
If a quotation mark is part of the literal, it must be represented in the string as two
contiguous quotation marks. Only one of these two quotation marks is included in
the character count.
The following example illustrates a nonnumeric literal:
"THIS IS A NONNUMERIC LITERAL"
"12345 THIS IS A NONNUMERIC LITERAL ALSO"
The following example illustrates a nonnumeric literal with an embedded quotation
mark:
"A "" IS PART OF THIS NONNUMERIC LITERAL"