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

What is the suffix of Fortran 2003?

Li_Dong
Beginner
783 Views

Hi,

I want to use ifort to compile Fortran 2003 source code, which suffix should I use? I tried f03, but it is not work.


Thanks

0 Kudos
1 Reply
Steven_L_Intel1
Employee
783 Views

You have a common misunderstanding of the way file types are used. These do NOT designate Fortran standards versions, but rather source form. The universally accepted file type (suffix) for free-form source is .f90. It is unfortunate, in hindsight, that this was chosen (it is not specified in the standard but all vendors settled on it) as it caused users, such as yourself, to believe that it was tied to the language version. It would have been better to choose something such as .ffr instead.

.f or .for is accepted for fixed-form source. One can write Fortran 2003 standard code in fixed-form.

I know that some vendors have contributed further to this confusion by supporting .f95 as a file type. We believe this is a mistake and have not followed it.

Please use .f90 in your sources to mean "free-form source".

0 Kudos
Reply