开发者

Difference between Fortran 90 and Fortran 95

Can I compile Fortran 90 files with a Fortran 95 compiler? Ther开发者_运维百科e seems to be a lot for Fortran 95 but not Fortran 90.


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜