[J3] US 23 (boz constants) glitches
John Reid
John.Reid at stfc.ac.uk
Tue Jan 18 11:52:22 UTC 2022
J3,
I think I have found two glitches associated with boz constants.
A draft paper is attached.
Comments, please.
John.
-------------- next part --------------
To: J3 J3/22-xxx
From: John Reid
Subject: US 23, boz constants
Date: 2022-January-18
Reference: 22-007
Discussion
----------
I think I have found two glitches associated with boz constants.
In 7.7 Binary, octal, and hexadecimal literal constants, C1539 states
"C7119 (R772) A <boz-literal-constant> shall appear only as a
<data-stmt-constant> in a DATA statement, as the <initialization> for a
named constant or variable of type integer or real, as the <expr> in an
intrinsic assignment whose <variable> is of type integer or real, as an
<ac-value> in an array constructor with a <type-spec> that specifies type
integer or real, as an output-item in an output statement, or where
explicitly allowed in 16.9 as an actual argument of an intrinsic
procedure."
A boz constant is not allowed as an output-item in an output statement,
see 12.6.3 Data transfer input/output list, para 11, which states
"An output list shall not contain an effective item that is a
<boz-literal-constant>."
A boz constant is allowed as a <scalar-expr> in an enum constructor, see
C7113 in 7.6.1 Interoperable enumerations and enum types, which states
"The <scalar-expr> in an <enum-constructor> shall be of type integer or
be a boz-literal-constant.
An edit to C7119 is suggested to cover these problems.
Edit to 22-007
---------------
[93:35] In 7.7 Binary, octal, and hexadecimal literal constants, C7119,
replace
"as an output-item in an output statement" by
"as <scalar-expr> in an enum constructor" so
that the constraint reads
C7119 (R772) A <boz-literal-constant> shall appear only as a
<data-stmt-constant> in a DATA statement, as the <initialization>
for a named constant or variable of type integer or real, as the
<expr> in an intrinsic assignment whose variable is of type
integer or real, as an <ac-value> in an array constructor with a
<type-spec> that specifies type integer or real, as <scalar-expr>
in an enum constructor, or where explicitly allowed in 16.9 as an
actual argument of an intrinsic procedure."
===END===
More information about the J3
mailing list