Ask a question
Limited-Time Offer: 50% off IBM TechXchange Conference 2025
IBM’s largest technical learning event is back October 6-9 in Orlando, FL
Originally posted by: Rafik_Zurob
Last week, an XLF user asked a question in the comp.lang.fortran newsgroup about how to get make to compile some Fortran files with fixed form and others with free form. There are several ways of doing this in XLF:
xlf test.f
The compiler will assume you have a FORTRAN 77 file. It will assume that the source is in fixed form. It will also assume other FORTRAN 77 defaults, such as the FORTRAN 77 way of formatting floating-point output, local variables being static, ... etc.
Alternatively, if you compile with:
xlf test.f90
The compiler will assume you have a Fortran 90 file. It will assume that the source is in free form. It will also assume Fortran 90 defaults, such as the Fortran 90 way of formatting floating-point output, local variables being automatic, zero being unsigned, ... etc.
XLF recognizes the following file extensions:
The file extensions that start with a capital F mean that the compiler is to run the files through the preprocessor before compiling them.
!IBM* SOURCEFORM(FIXED)
!IBM* SOURCEFORM(FREE(F90))