J4/02-0144
July 15, 2002
Page 1 of 2
(D-4) Clarify FORMAT clause GR2c3e
Charles C. Stevens
References:
1. December 2001 Draft Standard
2. J4/01-0376/99
(Klein/Josling)
Discussion
The current General Rule 2c3e for the FORMAT clause is ambiguous as to which implicit data-
description-entry is usaed depending on what value is represented by the floating-point literal used as
the source for a WRITE … FROM or REWRITE … FROM statement.
Proposed Changes:
1)
Page 286, 13.16.22.3, FORMAT clause, General Rule 2c3: Replace all text for subrule 3e with
the following:
e.
If the literal is a floating-point literal, the implicit data-description-entry shall be as floows,
depending on the magnitude of the literal:
If either the magnitude or the precision of the floating-point literal is greater than the
implementor defines for a data item declared USAGE IS FLOAT-LONG, the implicit data-
description-entry shall be
01
If in addition either the magnitude or the precision is greater than the implementor defines
for a data item declared USAGE IS FLOAT-EXTENDED, the compiler shall issue a syntax
USAGE IS FLOAT_EXTENDED.
warning.
If either the magnitude or the precision of the floating-point literal is greater than the
implementor defines for a data item declared USAGE IS FLOAT-SHORT but not than
defined for a data item declared USAGE IS FLOAT-EXTENDED, the implicit data-
description-entry shall be
01 USAGE IS FLOAT-LONG.
If neither the magnitude nor the precision of the floating-point literal is greater than the
implementor defines for a data item declared USAGE IS FLOAT-SHORT, the implicit data-
description-entry shall be
01 USAGE IS FLOAT-SHORT.
2) Page 681, B.1, Implementor-defined language element list, add the following entry: 65a)
FORMAT clause (floating-point literal as a source in a WRITE or REWRITE statement with the FROM
clause): The implicit data description-entry for a floating-point literal used as literal-1 n a WRITE or
REWIRTE statement with a FROM clause is dependent on the implementor’s definition of the
maximum precision and magnitude allowed in data items of USAGE FLOAT-SHORT, FLOAT-LONG
and FLOAT-EXTENDED (13.16.22, FORMAT clause, general rule 2c3e; 13.16.58.3, USAGE clause,
general rules 12 and 13).
RESOLVED ISSUES: None.
X:\J4\02-0144.DOC
10/23/2002 9:47 PM
Last printed
J4/02-0144
July 15, 2002
Page 2 of 2
OPEN ISSUES: None.
X:\J4\02-0144.DOC
10/23/2002 9:47 PM
Last printed