Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29106 Discussions

Any recommendations for auto indentation / beautify tools ?

Tony_Garratt
Beginner
1,415 Views

This question is not specific to Intel Fortran, but I thought I would ask the community anyway since someone out there may have a good recommendation. We have inherited some horrid Fortran code that is generally does not use indents - making it very difficult to follow IF blocks and DO loops. Dev studio can auto indent C++ code, but it appears it cannot with Fortran. Does anyone know of any automatic tools to do this for Fortran please?
Thank you!

0 Kudos
4 Replies
abhimodak
New Contributor I
1,415 Views
Tony

While there are good refactoring tools that can handle advanced tasks, the simplest way would be to just use "Replace" for common things such as if and do through out the code. You may write a macro for that is the Visual Studio.

Check "floppy" at www.fortran.com. I believe it is free.

If I may say so at the Intel Forum, the Photran refactoring can do things such as adding implicit none.

Abhi
0 Kudos
Tony_Garratt
Beginner
1,415 Views
Quoting - abhimodak
Tony

While there are good refactoring tools that can handle advanced tasks, the simplest way would be to just use "Replace" for common things such as if and do through out the code. You may write a macro for that is the Visual Studio.

Check "floppy" at www.fortran.com. I believe it is free.

If I may say so at the Intel Forum, the Photran refactoring can do things such as adding implicit none.

Abhi

I am test driving FLOPPY right now - its looks good, but stops at the 77 standard;shame it wasnt taken further todo atleast f90 or f95.........
0 Kudos
rase
New Contributor I
1,415 Views
I use the product plusFort and the included SPAG module (from "spaghetti code") of Polyhedron Software (www.polyhedron.co.uk) to reformat old and less old Fortran sources. SPAG provides many options for formatting including identation, renumbering of format numbers, and many more. It's not a bargain, but worth its price.
0 Kudos
cacciatore
Beginner
1,415 Views
Some year ago I found f2f90 by Peter A Rochford and f90ppr by Michael Olagnon. I used one of then, but don't remember wich one ( my memory is realy miserable). They are at http://gd.tuwien.ac.at/languages/fortran/freemarket/free.html
Regards,
Geraldo
0 Kudos
Reply