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

Clune, Thomas L. GSFC-6101 thomas.l.clune
Sun Oct 2 12:51:38 EDT 2016



On 10/2/16, 12:13 AM, "j3-bounces at mailman.j3-fortran.org on behalf of Malcolm Cohen" <j3-bounces at mailman.j3-fortran.org on behalf of malcolm at nag-j.co.jp> wrote:

    >By having them be module procedures, we can use the same name for these in 
    >every component and again avoid name space collisions.
    
    Well, except that if you ask for BIND(whatever,NAME=) you are going to have 
    to manage those name space collisions manually anyway, exactly the same as 
    for external procedures.

No, because the names would then only be a shared object library that is not directly linked to the main executable.  It nicely sidesteps the entire issue.   Each component will be in its own library, so there would be only one setServices() in each library, and that would be dynamically loaded as needed.

- Tom
-   
    
    That does not seem like a significant improvement over having the thing with 
    a global identifier actually being an external procedure, which assuming 
    access to private entities is wanted would be a wrapper for a module 
    procedure reference.
    
    Van writes:
    >Some but not all of the restrictions can be finessed using C_PTR.
    
    I think all of the restrictions can be finessed using C_PTR, one just has to 
    be a little inventive in how one writes the wrapper.
    
    >It would be helpful to be able to give a global name to a module procedure, 
    >and not have the restrictions of 18.3.7.
    
    Having a global identifier is one of the defining characteristics of an 
    external procedure.  In my opinion it is better not to go down that route 
    for module procedures.  I think that there are potentially better solutions.
    
    Cheers,
    -- 
    ...........................Malcolm.
    
    _______________________________________________
    J3 mailing list
    J3 at mailman.j3-fortran.org
    http://mailman.j3-fortran.org/mailman/listinfo/j3
    





More information about the J3 mailing list