Reputation: 437
What is the best way to take apart a fortran 77 code that uses implicit declarations and go to statements? I am used to working with f95 or higher with explicit declarations, modules, data types etc. This f77 stuff gives me headaches.
Any pointers from others experience on how to go about taking such ancient code apart would be greatly appreciated.
Upvotes: 1
Views: 486
Reputation: 103
fortran77 code can be crufty. One useful thing to do is to modernize with some tools:
Alan Miller's to_f90 or Metcalf's "convert"
Polyhedron's "spag" tool to remove ~ two thirds of the goto's
Sometimes do/cycle/exit's are the only way to deal with fortran goto's More about goto remediation can be found here:
http://engineering.dartmouth.edu/~d30574x/consulting/consulting_gotorefactor.html http://engineering.dartmouth.edu/~d30574x/consulting/consultingIndex.html
Also, if you wanted it in matlab you can use f2matlab at the file exchange.
Good luck!
Upvotes: 1