Re: gfortran and the family of fortran array types
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Thu, 28 Aug 2008 07:47:14 -0700
Jugoslav Dujic <jdujic@xxxxxxxxx> wrote:
With F2003 C interop, C_LOC does that conversion explicitly and is
guaranteed to be portable. Before that, one would just pass the array
(assumed-size assumed by compiler), relying on both compilers to do
the right thing (they would most often do, but it wasn't guaranteed
by the Standard).
Just to clarify (I hope)... withF2003 BIND(C) on an appropriate
interface the result is guaranteed to be portable. One could misread the
above as implying that C_LOC is needed for a guarantee of portability.
It isn't. In fact, it is the BIND(C) that gives you the portability
guarantee - not the C_LOC. Without the BIND(C), the C_LOC stuff wouldn't
be portable... and indeed, as Glen notes, would likely not work without
extra hacks; you'll end up passing the C_LOC result by reference.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- References:
- Re: gfortran and the family of fortran array types
- From: relaxmike
- Re: gfortran and the family of fortran array types
- From: relaxmike
- Re: gfortran and the family of fortran array types
- From: Richard Maine
- Re: gfortran and the family of fortran array types
- From: Jugoslav Dujic
- Re: gfortran and the family of fortran array types
- Prev by Date: Re: FlyAway --Re: Surprise
- Next by Date: Re: FlyAway --Re: Surprise
- Previous by thread: Re: gfortran and the family of fortran array types
- Next by thread: F2003 complier, how far from us?
- Index(es):
Relevant Pages
|