[J3] [EXTERNAL] [BULK] Re: Consistency in conversion functions

Steven G. Kargl kargl at uw.edu
Tue Apr 4 17:14:40 UTC 2023

On Tue, Apr 04, 2023 at 04:17:56PM +0000, Jeff Hammond via J3 wrote:
> Consistency is exactly why I want this, and I’m glad that non-human code composition tools motivate it as well.
> I see this as essentially trivial to fix.  We just say that INTEGER() does the same thing as INT().  Same for COMPLEX() and CMPLX().  Then we never have to look at them again.

COMPLEX() and CMPLX() are not the same thing with gfortran.

% cat a.f90
program foo
  print *, kind(cmplx(1.d0,1.d0))
  print *, kind(complex(1.d0,1.d0))
end program foo

% gfortran11 -o z a.f90 && ./z

I have no standing with J3, but I certainly hope someone
who does would object to the needless duplication of an
intrinsic procedure that perpetuates the problem with 
the default kind for CMPLX() in the absence of the third
actual argument KIND=.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3950 bytes
Desc: not available
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230404/5f30079d/attachment.bin>

More information about the J3 mailing list