(j3.2006) (SC22WG5.5615) RE: F08/0139??

Malcolm Cohen malcolm
Sun Dec 20 20:24:38 EST 2015


Interp says

> Consider the program fragment:
>
>  Subroutine s() Bind(C,Name='Hello')
>      Print *,'Hello'
>  End Subroutine
>  Subroutine s() Bind(C,Name='World')
>    Print *,'World'
>  End Subroutine
>
> This does not conform to Fortran 2003, and is not listed as an
> extension in the Introduction to Fortran 2008, but the rules for
> global names seem to indicate that this is now conforming.


Bill Says:
>You could alternatively make a module containing the text from the example, 
>and have the main program use the module and call s().

Actually no.  The "rules for global names" in the question means that these 
must be external subprograms, otherwise their names are Not global names. 
I'll accept that this is not completely obvious if you stop reading at the 
end of the program fragment!  (Though I cannot recall us *ever* giving an 
example with internal or module procedures that did not either state that 
they were such, or with enough boilerplate around them to make them such, so 
I do think this reading is a trifle strained.)

>A whole, compilable and executable example would much better.

Just inserting "containing the external subprograms" after "fragment" in the 
first quoted line above would IMO be more than sufficient.

Cheers,
-- 
..........................Malcolm.




More information about the J3 mailing list