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

Michael Ingrassia michaeli
Mon Jul 9 17:40:50 EDT 2007


Here's a cute case that's come up.

Is
	INTERFACE FOO
	SUBROUTINE S()
        END SUBROUTINE S
	END INTERFACE

        CALL FOO()
        END
        SUBROUTINE S()
        PRINT *, 'hello world'
        END SUBROUTINE S


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?  

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."   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.



More information about the J3 mailing list