(j3.2006) Alternative binding label without C interoperability?
Bill Long
longb
Mon Sep 26 15:58:08 EDT 2016
On Sep 26, 2016, at 1:23 PM, Clune, Thomas L. (GSFC-6101) <thomas.l.clune at nasa.gov> wrote:
> 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?)
Probably simpler to not conflate this with the BIND attribute, and have a new suffix, like
subroutine setServices(gc, rc) binding_name(?set_services?)
Cheers,
Bill
> ????
>
> - Tom
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.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./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3
mailing list