X3J3/96-165
Page 1 of 1
Date: November 11, 1996
To: X3J3
From: Loren Meissner
Subject: Minor Technical Enhancement M6: Revisited
At Meeting 138, X3J3 approved (8-4) addition of a few conversion
intrinsics (INT, REAL, DBLE, and CMPLX) to the list of functions
permitted in an Initialization Exression. (This position evolved
over a few meetings as a preferred alternative to creating a new
sort of complex constant that is partly literal constant and partly
named constant.)
Subsequently, it has been suggested that further intrinsic functions
be permitted in initialization expressions. I sent an email message
to X3J3 in early October asking for opinions on this question. I
received a few replies, all favoring extension in this area. Later,
a posting on comp-fortran-90 questioned why ATAN, SIN, etc. should
not be permitted.
I have identified five possible levels for extension. (The only
intrinsics at question are the elementals; others except ALLOCATABLE
are already permitted.)
1. As in Fortran 95: permit only those elemental intrinsics that
have arguments and results of integer or character type;
2. As "approved" at meeting 138, add INT, REAL, DBLE, and CMPLX
3. As above PLUS all other conversion intrinsics: AIMAG, AINT,
ANINT, CEILING, FLOOR, and NINT;
4. All elemental itrinsics EXCEPT the math functions ABS(z), ACOS,
ASIN, ATAN, ATAN2, COS, COSH, EXP, LOG, LOG10, SIN, SINH, SQRT,
TAN, TANH;
5. All elemental intrinsics
NOTE that F95 added all elemental intrinsics to the list for Speci-
fication Expressions, along with user-defined PURE functions.
CONCERNS:
Traditionally, an objection to level 5 has been that the compiler
should not be required to have access to the math library. Responses
to my positings indicate that this is no longer a major concern.
Another problem is cross compilation: a small computer might have
trouble simulating complicated operations for initialization on a
larger computer, for example.
POSSIBLE STRAW VOTE: Should extension go to level 3, 4, or 5 as
listed above?