For Programmers: Free Programming Magazines  


Home > Archive > Fortran > October 2004 > Difference between EXTERNAL and INTERFACE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Difference between EXTERNAL and INTERFACE
Jason

2004-10-17, 3:56 pm

To NG:

I am quite confuse when to use EXTERNAL and INTERFACE when it comes to
calling a F77 function/subroutine. Let's say there's a F77 function called
F77_function in F77_SUB.F, and I want to call the function from a program
written in F90. Do I use EXTERNAL or INTERFACE to describe the F77 function?


Thanks.


Michael Metcalf

2004-10-17, 8:56 pm


"Jason" <JC20032344@hotmail.com> wrote in message
news:Voxcd.5979$232.3762@trnddc09...
> To NG:
>
> I am quite confuse when to use EXTERNAL and INTERFACE when it comes to
> calling a F77 function/subroutine. Let's say there's a F77 function called
> F77_function in F77_SUB.F, and I want to call the function from a

program
> written in F90. Do I use EXTERNAL or INTERFACE to describe the F77

function?
>

Either, but not both. An interface block is better as it permits all sorts
of checks to be made, but external suffices (see also "Fortran 90/95
Explained", Section 5.11).

Hope that helps,

Mike Metcalf


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com