Fortran 77 and Fortran 95 in the same project simultaneously

Fortran 77 and Fortran 95 in the same project simultaneously

Lukas W.'s picture

Hello,

I wanted to ask whether it is possible for the same project was code from Fortran 77 and Fortran 95 simultaneously. Large amount of code we already have in Forran 77, but new things I wanted to do it in Fortran 95. I tried it and it seems that it works. I'm interested to see if it is in principle possible? I'm not sure about the accuracy of the solution. That's why I'm interested in the viewexperienced programmer.

Best regards
Thank you

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Les Neilson's picture

Yes there is no problem mixing the two - Fortran 77 is a subset of Fortran 90.

Les

mecej4's picture

Lukas W: Often, when people say "F77" or "Fortran-77", they really mean "fixed-format Fortran source". If so, the compiler needs to process some source files as fixed-format sources and others as free-format sources.

If you had this in mind, as well, note that compilers and build systems such as Visual Studio typically associate file endings such as ".f" and ".for" with "fixed-format source" and ".f90" with "free-format source".

Tim Prince's picture

All compilers will have difficulty when include files use different formatting from the parent file.  ifort can handle simple cases of compilations of mixed fixed and free form where other compilers will require seperate compile commands to make objects, which still should be link compatible.

Login to leave a comment.