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!

FORTRAN 77 file calling a FORTRAN 95 file

Status
Not open for further replies.

nonfamouswentz

Programmer
Feb 7, 2014
1
To start, I have two codes. One is written in FORTRAN 77 and the other in 95. Both codes have a main function that calls subroutine, that calls a subroutine, that calls a subroutine, and so on. My predicament is that in the middle of the FORTRAN 77 code, I need a value from the middle of the FORTRAN 95 code. The 77 code has static values (you run it, it returns a value), and the 95 code requires about 6 input variables to run that are needed to get that one value that I need.

How do I go about this? I would be glad to provide more information, including the codes (if someone would like to see them)
 
how do you go about what?

At it stands:
you run F95 program, get the value you need
then, you run F77 program
 
nonfamouswentz said:
The 77 code has static values (you run it, it returns a value), and the 95 code requires about 6 input variables to run that are needed to get that one value that I need
The answer is simple - you have to create a new program.
Make a subroutine with 6 inputs and 1 output from the F95 code.
Take the main program logic from the F77 code and call the subroutine on the place where you need it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top