2

Yep I know.., this is not imagined ... it's a real Fortran question.

By previous versions I mean Fortran 2003, 95, 90, and even 77.

by backwards compatible I mean can easily run code written for previous versions in 2008 (with nothing more than some minor changes to syntax)?

3
  • 3
    Benchmark: Took less than 7 minutes to appear on Google.
    – user922475
    Commented May 4, 2012 at 21:01
  • Compilers mostly are, language standard is not, especially for pre-77 features. Commented May 5, 2012 at 12:39
  • I'm enjoying the Fortran so far. Code is very portable. No preprocessing, just take any version of Fortran, compile it into an object file, then link it to whatever code you want. I know this won't work 100% of time but it's been fairly easy.
    – user922475
    Commented May 6, 2012 at 23:36

2 Answers 2

6

Nothing was deleted in Fortran 90 but some awful features have been deleted in Fortran 95 and later. More have been marked as "obsolescent". See, e.g., http://www.cisl.ucar.edu/zine/96/fall/articles/3.f90.obsolete.html. As a practical matter compiler vendors still include these features because there is so much legacy code out there. There would be customer rebellion if compilers couldn't compile legacy FORTRAN 77 programs.

2
  • I don't really understand why there should be customer rebellion. If you have a F77 program, you compile it with a F77 compiler. If you have a F2k code, you compile it with the F2k compiler and then link them together. There are so many design mistakes in Fortran that a real, deep cleanup would benefit users and compiler developers. Commented May 6, 2012 at 8:41
  • Most people want one compiler. The clean approach with one compiler is to disable the deleted features by default and provide the possibility of enabling them with a compiler option. And to warn about usage of obsolescent features by default.
    – M. S. B.
    Commented May 7, 2012 at 1:18
2

Sure. This is all what Fortran is about, which is backward compatibility. Often, one expects that the Fortran standard is supported for the next 50 years (not kidding). You can still compile a Fortran 66 code with the intel compiler which supports most features of 2008 standard.

2
  • No you can't. Try changing a cycle variable inside a loop. Commented May 6, 2012 at 8:42
  • @Stefano Borini: I think you can, if you add -f66 compiler option to ifort. There are of course some incompatibilities but in general it works. Commented May 11, 2012 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.