Difference between Fortran 90 and Fortran 95

后端 未结 2 530
眼角桃花
眼角桃花 2021-01-19 06:20

Can I compile Fortran 90 files with a Fortran 95 compiler? There seems to be a lot for Fortran 95 but not Fortran 90.

相关标签:
2条回答
  • 2021-01-19 06:57

    Yes, you can compile Fortran 90 programs with a Fortran 95 compiler. Actually, most of the compilers out there are now largely but not totally compliant with Fortran 2003. Unless you have unusual requirements, you are better off with a Fortran 95/2003/2008 compiler rather than a Fortran 90 only one. Fortran 95 is somewhat of a "bug fix" to Fortran 90 ... it was a modest update based upon the experience with actually using Fortran 90, which was a huge change from Fortran 77. For example, it is easier to have memory leaks in Fortran 90 ... in Fortran 95 local allocatable variables must be automatically deallocated upon exit from a subroutine so the programmer doesn't have to explicitly do the deallocation. In Fortran 90, if the deallocation wasn't explicitly coded, a memory leak was allowed to occur.

    For a free compiler, recent versions of gfortran are quite good.

    0 讨论(0)
  • 2021-01-19 07:15

    This one can:

    NAGWare f95 Compiler Release 5.1

    See also:

    • Clive Page's list of Fortran Resources

    • Michel Olagnon's Fortran 90 List

    0 讨论(0)
提交回复
热议问题