(j3.2006) can't seem to write a standard-conforming program with a generic interface

Bill Long longb
Mon Jul 9 18:05:55 EDT 2007

Michael Ingrassia wrote:
> Here's a cute case that's come up.
> Is
>         CALL FOO()
>         END
>         SUBROUTINE S()
>         PRINT *, 'hello world'
> a standard-conforming program?
> Before you answer too quickly -- suppose my standard-conforming processor
> allows additional intrinsic procedures as permitted in Section 1.5,
> and one of those intrinsic procedures is named FOO.   Then my generic interface
> block combines its interface with the intrinsic interface in Fortran 2003
> so I'm using the (nonstandard) intrinsic procedure, right?  

I'm not sure what you mean by "using".  The reference to FOO matches the 
interface for S, so S will be called. Even if the intrinsic FOO has the 
same interface as S.  See [408:26-28] in f03.

> But section 1.5 goes on to say
> "A standard-conforming program shall not use nonstandard intrinsic
> procedures or modules that have been added by the processor."   

I believe the intent here is that a standard-conforming program not 
reference a nonstandard intrinsic procedure.  You are not referencing 
the nonstandard intrinsic above.


> So in 
> fact I'm not standard-conforming after all!  Or else I'm standard-conforming
> or not depending on which processor is lying near to hand ... and that seems
> unsatisfactory too.
> Too bad I can't throw in an "EXTERNAL FOO" statement here, but as I recall
> that makes foo into an external procedure which, whatever it is, isn't a
> generic interface.
> 	--Michael I.
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120


More information about the J3 mailing list