[J3] Consistency in conversion functions

Gary Klimowicz gak at dancingbear.dev
Tue Apr 4 15:44:42 UTC 2023

On Apr 4, 2023, at 08:18, Steve Lionel via J3 <j3 at mailman.j3-fortran.org> wrote:
> On 4/4/2023 3:52 AM, Jeff Hammond via J3 wrote:
>> 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.
> Technical reason - FORTRAN 66 limited function names to six characters. Yes, we could now create aliases for these with longer names as "syntactic sugar", but it would not add functionality.

In fact, Fortran 77 had the same requirement of identifiers being limited to six characters (2.2 Syntactic items). Type names weren't symbolic names, and so weren't as limited (e.g., CHARACTER). There was no LOGICAL conversion intrinsic function in F77. (It appeared in Fortran 90, 13.10.7, and isn't really a "conversion function" like INT, as its first argument is a LOGICAL; it just converts between different KINDs.)

> Does this bother anyone else?

No more than when English elides the apostrophe in possessive "it".

"I am like a deer caught in a car's headlights."

"A car is coming. I am like a deer caught in its headlights."

Languages that evolve each have some things I classify as "historical charm".

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

More information about the J3 mailing list