(j3.2006) Alternative binding label without C interoperability?

Clune, Thomas L. GSFC-6101 thomas.l.clune
Mon Sep 26 14:23:08 EDT 2016


I have a scenario in which it would be highly desirable to place a suite of procedures in a shared object library for later access by an abstract framework.  (ESMF if you care about such things.)

Unfortunately, the usual name mangling by the compiler makes this a bit less friendly than is desirable.    But then the F2003 feature for providing an alternative binding label raised hopes that we could do something like:


subroutine setServices(gc, rc) bind(c,name=?set_services?)
    use ESMF
    type (ESMF_GridComp), intent(inout) :: gc
    integer, intent(out) :: rc
end subroutine setServices


As written, this is nonstandard, as the framework derived types are not interoperable.

However, in this situation, there is no desire to achieve C interoperability.  Rather just a desire to have a standard conforming way to control the binding label.

First question:   Have I missed some other mechanism to achieve this?

Second question:  Presuming the answer to the 1st question is ?no?, then how hard would it be to allow  an interface to look like:

subroutine setServices(gc, rc) bind(name=?set_services?)

or

subroutine setServices(gc, rc) bind(fortran, name=?set_services?)

????

- Tom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20160926/a7b1c517/attachment.html 



More information about the J3 mailing list