[J3] Consistency in conversion functions

Jeff Hammond jehammond at nvidia.com
Thu Apr 6 08:09:35 UTC 2023


I appreciate Kurt’s suggestion and I’ll just do that in the future, since I would like the conversion intrinsic name to match the type, consistent with REAL(), LOGICAL() and C.

I would support Malcolm’s #3 if someone proposes it.  Perhaps Steve will be happy with this one too.

> On 6. Apr 2023, at 1.27, Malcolm Cohen via J3 <j3 at mailman.j3-fortran.org> wrote:
> 
> External email: Use caution opening links or attachments
> 
> 
> 1. What Kurt said.
> 
> 2. We have six intrinsic type specifiers (for five intrinsic type). We have conversion intrinsics for all six (plus CHARACTER has an extra one). Of those six intrinsic type specifiers:
> - four have contracted names (INT, DBLE, CHAR/ACHAR, CMPLX)
> - one has the name in full, but it is the same as what the contracted name would be anyway (REAL)
> - one has the name in full, and it is longer (LOGICAL).
> 
> Clearly, the easiest route to 'consistency' would be to add LOGICL for Logical kind conversions, as that is the only inconsistent one.
> 
> 3. Dusting off the old proposal for COMPLEX (which it seems that gfortran did) would at least potentially fix future user bugs, so that would be the most attractive proposal so far. But existing bugs won't be fixed unless more compilers could produce warning messages when the user has CMPLX with a double or quad precision argument, which we could encourage by adding COMPLEX in F202y and making CMPLX obsolescent in F203z.
> 
> Cheers,
> --
> ..............Malcolm Cohen, NAG Oxford/Tokyo.
> 
> 



More information about the J3 mailing list