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

Fixed format to free format conversion

jarvus9
Beginner
941 Views
I'm looking to convert several fortran programs that each have thousands of lines of code from fixed format to free format.
[I would be happy sticking with fixed format, but I am limited to 132 characters per line. Given the newer, larger monitors and long, descriptive variable names, I want to be able to put more characters per line. Going to free format seems the only option]
I've browsed around the web some and haven't found much (my search skills are not the best).
Does anyone have any suggestions for programs to do this (and any other issues I may encounter)? All things being equal, a free program would be better. However, I would be willing to spend ~$100 or so for one that worked well, versus spending many hours cleaning up the results of one that worked poorly.
I poked around www.fortran.com and www.fortranlib.com and didn't find much.
Thanks for any suggestions.
0 Kudos
2 Replies
TimP
Honored Contributor III
940 Views
You should have found such programs on those sites. Alan Miller's and Mike Metcalf's fixed to free format conversions have worked well for me on a variety of platforms. There are others which should work at least on linux and cygwin.
0 Kudos
Steven_L_Intel1
Employee
940 Views
Let me point out that with fixed format, you're limited to 72 columns unless you use a vendor-specific switch or directive. Free-form limits you to 132 columns per the standard, though Intel Fortran supports much longer lines.

I do not recommend exceeding the standard's limits here - it will cause you pain down the road, especially as the failure mode can be difficult to predict.
0 Kudos
Reply