Reputation: 21
I am looking for a utility to convert fortran IV code to a more structured sort of fortran like fortran 77 or later. I am trying to understand what exactly the code does and all those "goto" and calculated "if" statements don't help. Thanks.
Upvotes: 2
Views: 1332
Reputation: 62538
All already mentioned aside, in the end it always comes down to a bit of hard labour :) And that's where SciTools Understand shines.
Upvotes: 2
Reputation: 29391
There is also PlusFort, which can do comprehensive restructuring -- see the examples at http://www.polyhedron.com/spag0html. There is a reduced capability version that is free for certain uses: http://www.polyhedron.com/pflinux0html
Upvotes: 1
Reputation: 41759
There's a section of the FORTRAN FAQ on this (search for "Code re-structurers and converters")
TIDY looks like it will do some of the work for you. Unfortunately not including the calculated-if and goto
Web page last updated more than 10 years ago!
A commercial product is here, but costs ~$500 for 5000 lines of conversion.
Courses on how to do this manually can be found here
IBM utility to convert Fortran IV to PL-I :) written in 1973, it seems
Upvotes: 1