Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Which standard one should use?

Nicholas_S_
Beginner
242 Views

There are advantages to use the most recent standards? For example, to always use the flag -std15?

0 Kudos
3 Replies
Steve_Lionel
Honored Contributor III
242 Views

That's not what that switch does. It controls which standard the compiler checks syntax against for diagnostic purposes - it doesn't change the meaning of programs. The switch I do recommend using is -standard-semantics - this DOES change various defaults to reflect Fortran 2003 and later. There is no switch that selects among different standards (other than -f77 which switches between F77 and F66.)

0 Kudos
DataScientist
Valued Contributor I
242 Views

I started Fortran programming with F77 standard. Nowadays, I am using Fortran 2003/2008 features everywhere in my Fortran codes on a daily basis, even some new features from the upcoming standard Fortran 2018. I can tell you that using the most recent Fortran standards, can tremendously increase your productivity. But simply asking the compiler to recognize the most recent standard syntax will Neither help you nor increase your productivity. You need to "learn" the new features of Fortran from a resource. There are many good books on "modern Fortran". Just search the terms on the web. Among them, I believe "Modern Fortran Explained" by Metcalf et al is one of the most comprehensive and useful textbooks available.

0 Kudos
Steve_Lionel
Honored Contributor III
242 Views

Intel Fortran always recognizes the latest syntax (for features it supports). The difference is whether it can issue diagnostics for uses not included in particular standard revisions.

0 Kudos
Reply