Re: [AMBER-Developers] updating Fortran files to .F/.F90

From: Ben Roberts <>
Date: Mon, 10 Oct 2011 15:43:43 -0400

Hi Tyler,

On 10/10/2011, at 3:29 p.m., Tyler Luchko wrote:

> Hello Everyone,
> At the last developers meeting I proposed changing our Fortran file
> naming scheme from the generic '.f' to using '.F' for fixed format,
> pre-processed files, '.F90' for free format, pre-processed files and
> '.f' for fixed format files without pre-processing. As a result of this
> name change explicit calls to the C pre-processor would be removed and
> the compiler's built in pre-processor would automatically be called.
> The motivation for this change is:
> 1) Easier debugging as line numbers refer to the original source file
> and not an intermediate.
> 2) Eliminating intermediate files reduces clutter, disk space and,
> possibly, compile time.
> 3) This is a universal convention (though not part of an official
> standard) and has been in use for over a decade by many compilers. If
> we choose to move to a different build system (e.g. cmake) this will
> also help ease the transition.

I like this idea. In fact, I started doing something similar myself a while ago, but at the time Dave Case argued against it. My motivation was by no means as strong an argument as yours; I was simply sick of my syntax-aware editors highlighting the free-format F90 source files as if they were fixed-format F77.

There is one thing that you can perhaps clarify for us. Will this in any way change the syntax needed for #ifdef declarations and the like? And are there any disadvantages to using the Fortran preprocessor instead of the C preprocessor? I gather there is some reason why we've been explicitly asking for a C preprocessor instead of relying on the Fortran compiler's preprocessor; perhaps this reason is purely historical, though.

For greater security, I support S/MIME encryption.

AMBER-Developers mailing list

Received on Mon Oct 10 2011 - 13:00:03 PDT
Custom Search