Re: Calling Fortran 77 from Fortran 95
- From: sturlamolden <sturlamolden@xxxxxxxx>
- Date: Sun, 6 Mar 2011 11:48:22 -0800 (PST)
On 6 Mar, 19:48, n...@xxxxxxxxx wrote:
Mark it BIND(C). In all compilers I know of, it will happen, anyway.
But why do you want to? If you want to call C, you should use
the C interoperability features. If not, your program can't tell.
Say I have a F77 package called LAPACK. (Vendor supplied, not one I
can build with my F95 compiler.)
Obviously I don't want the F95 compiler to pass a dope array to F77.
So I want to prevent that.
Then there is the question of the leading dimension, e.g. LDA and LDB
arguments. An F95 compiler can do copy-in copy-out, but then I have no
idea what the leading dimension is. The leading dimension might be
contiguous or it might not.
real :: X(100,4)
X(1:10,:) ! whats the leading dimension of this? 10 or 100?
C gives me full control of this, but in F95 it seems I can just depend
on the F95 compiler to do whatever it wants. The principle of "it just
works" usually depends on the same compiler being used to build
everything.
Sturla
.
- Follow-Ups:
- Re: Calling Fortran 77 from Fortran 95
- From: Richard Maine
- Re: Calling Fortran 77 from Fortran 95
- From: nmm1
- Re: Calling Fortran 77 from Fortran 95
- References:
- Calling Fortran 77 from Fortran 95
- From: sturlamolden
- Re: Calling Fortran 77 from Fortran 95
- From: nmm1
- Calling Fortran 77 from Fortran 95
- Prev by Date: Re: Calling Fortran 77 from Fortran 95
- Next by Date: Re: Calling Fortran 77 from Fortran 95
- Previous by thread: Re: Calling Fortran 77 from Fortran 95
- Next by thread: Re: Calling Fortran 77 from Fortran 95
- Index(es):