Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

want to use external file.f

Status
Not open for further replies.

TheKKK

Technical User
Mar 21, 2009
10
GR
I want to use an external file functions.f that has a number of routines/functions into my code maincode.f90 (without copying it under my code with the command "contains").
I have used the following code but it doesnt seem to work.
Which is the appropriate syntax?

program maincode

EXTERNAL functions

x = function(5)

end program





 
The EXTERNAL statement should not be used in your case. You only have to compile the 2 sources (funcions.f and maincode.f) and link them to one executable.

Here are some links for you to better understand the EXTERNAL statement:





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top