Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29286 Discussions

Fortran 77 and Fortran 95 in the same project simultaneously

Lukas_W_
Beginner
975 Views

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

0 Kudos
3 Replies
Les_Neilson
Valued Contributor II
975 Views

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

Les

0 Kudos
mecej4
Honored Contributor III
975 Views

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".

0 Kudos
TimP
Honored Contributor III
975 Views

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.

0 Kudos
Reply