[J3] [EXTERNAL] Re: type definitions

Steve Lionel steve at stevelionel.com
Thu Aug 11 20:32:51 UTC 2022

On 8/11/2022 4:08 PM, Van Snyder via J3 wrote:

> Tom's example didn't include IMPLICIT NONE, so I questioned whether 
> Tom's hope that the reference to KIND(X) in a specification expression 
> was in fact nonconformant. 

Sorry for being snarky, earlier - this is an interesting question and I 
need to change my earlier answer, though I cited the correct text.

In Tom's example, X is implicitly typed default real when it appears in 
KIND(X). That the explicit declaration of X confirms that type and kind 
is allowed.

If you change it to:


then both ifort and nagfor complain that you're changing the type/kind 
of a previously declared variable.

If I then add IMPLICIT NONE, nagfor complains:

KIND intrinsic function of X used in its own specification

and ifort (with standards warnings enabled) says:

Implicit type is given to allow out-of-order declaration. Non-standard 
extension.   [X]

Bob's examples, however, I think are still fine.

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

More information about the J3 mailing list