(j3.2006) DOUBLE PRECISION and C Interoperability

Micki St. James mickistjames
Wed Sep 5 22:10:44 EDT 2012


Let's see how close I can get if I take a stab on this based on my now fading memories of interoperability.

"Interoperability" between C and Fortran sounds symmetric bit it's really asymmetric.  It means you can define the entity in C using the C type and proceed to operate on it in Fortran as an object of the interoperable type.  It implies nothing at all about whether you can declare an entity in Fortran with the. Fortran type and do any work at all in C with it.  It wouldn't seem to be the Fortran standard's job to spell out what you can do with C programs anyway, that's a job for the C standard.   

So if the C type is the one with stricter alignment I don't see any obstacle to Fortran interoperability at all.  There would be a problem with C-POV-interoperability which is a term I just made up so I could speak authoritatively about it.

Maybe "Fortran-operability" would have been a term that matched the semantics better than "interoperability".

Or, I could be remembering this all wrong.

Micki

Sent from my iPhone

On Sep 5, 2012, at 6:41 PM, Robert Corbett <robert.corbett at oracle.com> wrote:

> If a C companion processor imposes stricter requirements
> on alignment for objects of type double than a Fortran
> processor can guarantee for objects of type
> DOUBLE PRECISION, can C double and Fortran DOUBLE PRECSION
> be considered interoperable types?
> 
> Robert Corbett
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3



More information about the J3 mailing list