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

Clune, Thomas L. (GSFC-6101) thomas.l.clune at nasa.gov
Tue Apr 4 19:30:31 UTC 2023

To be completely honest …   I’m probably more bothered by the fact that LOGICAL, INTEGER, and COMPLEX all have the same number of characters, but REAL does not.    Makes my dummy argument declarations “jagged”.

Silly, I know.   But …

From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3 <j3 at mailman.j3-fortran.org>
Reply-To: j3 <j3 at mailman.j3-fortran.org>
Date: Tuesday, April 4, 2023 at 3:25 PM
To: j3 <j3 at mailman.j3-fortran.org>
Cc: Brad Richardson <everythingfunctional at protonmail.com>
Subject: [EXTERNAL] [BULK] Re: [J3] Consistency in conversion functions

CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.

I'm sympathetic with the desire for consistency within the language, but this is not a thing that has ever really bothered me. I think there's other issues more worthy of our time.


On Tue, 2023-04-04 at 07:52 +0000, Jeff Hammond via J3 wrote:
To convert INTEGER kinds, we use INT().
To convert COMPLEX kinds, we use CMPLX().
To convert REAL kinds, we use REAL().
To convert LOGICAL kinds, we use LOGICAL().

Does this bother anyone else?

Are there technical or non-technical reasons why we bring consistency to this situation, by adding INTEGER() and COMPLEX() conversion intrinsics?  I have found the need to use INT() surprising and annoying often enough to have a practical motivation to solve this, not just an aesthetic one.

The only issue I see is that GNU has an extension COMPLEX() but I don’t see an incompatibility with CMPLX there, because the behavior of COMPLEX is a subset of CMPLX.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230404/ab15f0f1/attachment.htm>

More information about the J3 mailing list