J3/01-394R1
To: J3
From: Larry Meadows
Date: December 5, 2001
Subject: BOZ Constants
References: J3-01/324 and lots of others
J3 has indicated a desire to change the implementation of BOZ
constants in 007-R4 so that they provide some new functionality
while not breaking current practice.
This paper changes the draft standard to
revert to the use of BOZ constants in F95, with
the additional ability to use BOZ constants in the type conversion
intrinsics REAL, CMPLX, DBLE, or INT. Since DBLE and CMPLX refer
to REAL, the edits to the definitions of DBLE and CMPLX are
minimal.
Edits (007-R4):
[35:20-21] Delete
[35:19+] Insert the constraint:
Cxxx(R408) A boz-literal-constant shall appear only in a DATA
statement, as the first argument to the numeric intrinsic
functions DBLE, REAL, or INT, or as the first or second
argument to the numeric intrinsic function CMPLX.
[84:26+] Insert the paragraph:
If a data-statement-constant is a boz-literal-constant, the
corresponding object shall be of type integer.
A data-stmt-constant that is a boz-literal-constant is
treated as if the constant were an int-literal-constant
with a kind-param that specifies the representation
method with the largest decimal
exponent range supported by the processor.
(allow BOZ constants in CMPLX)
[289:25] Insert ", or a boz-literal-constant" before "."
[289:26-] Insert ", or a boz-literal-constant" before "."
Note to editor: there is no line number for the line before
26. In fact this appears to be a problem for many of the
intrinsics in 13, where the description for an argument
takes more than one line.
(allow BOZ constants in DBLE)
[294:13] Insert ", or a boz-literal-constant" before "."
(allow BOZ constants in INT)
[305:6] Insert ", or a boz-literal-constant" before "."
[305:16+] Add a new case:
Case (iv): If A is a boz-literal-constant, it is treated
as if it were of the integer type that
has a kind type parameter that
specifies the representation method with the largest
decimal exponent range supported by the processor.
(allow BOZ constants in REAL)
[325:31] Insert ", or a boz-literal-constant" before "."
[326:2+] Add a new case:
Case (iii): If A is a boz-literal-constant and KIND is present,
the kind type parameter is that specified by the value of KIND.
If A is a boz-literal-constant and KIND is not present,
the kind type parameter is the processor-dependent kind
type parameter for the default real type.
[326:7+] Add a new case:
Case (iii): If A is a boz-literal-constant, the result is
equal to TRANSFER(INT(A),M) where M is scalar and
of type REAL. If KIND is present, M has the kind type
parameter specified by the value of KIND. If KIND is not
present, M has the processor-dependent kind type parameter for
the default real type.