[J3] restricted specifics

Kurt W Hirchert kurthirchert at gmail.com
Mon Oct 5 18:57:23 EDT 2020

On 10/5/2020 5:28 PM, Robert Corbett via J3 wrote:
> Table 16.3 lists a set of restricted specific functions.
> Some of the specific functions have the same names as
> the corresponding generic functions, namely CHAR, ICHAR,
> INT, LGE, LGT, LLE, LLT, AND REAL.  Is there a way to
> access these specific functions?  Would the language be
> changed if they were not available as specific
> functions?
> The definition of REAL is probably a mistake.  In
> FORTRAN 66, the REAL instrinsic was the complement of
> AIMAG.  Its argument had to be of type COMPLEX, which
> is our default complex.
> Robert Corbett

They can be supplied as actual arguments associated with dummy 
procedures.  This is a largely useless functionality (in my opinion), 
but those particular specifics need to be there to claim compatibility 
with F66 and F77.  Note that specifics were not provided for any 
intrinsic added in f90 or later.  If, for some reason, you need to pass 
one of the newer intrinsics to a procedure, you can instead pass a 
user-written function that does nothing but invoke the intrinsic.

The decision to use REAL as the generic name for the union of FLOAT,  
SNGL, and REAL was made by the F77 committee, so I have no special 
insights on that decision, but REAL does seem like a reasonable choice 
to me.  After all, they are all functions to convert their arguments to 
type [default] REAL  The addition of the optional KIND argument to REAL 
was done by the F8X/F90 committee as part of the recharacterization of 
DOUBLE PRECISION as a different kind of REAL rather than a totally 
distinct type.  If you have questions/comments about that, I may be able 
to dredge up the relevant reasoning from my memory.


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

More information about the J3 mailing list