Ask a question
Fuel your AI at the ultimate IBM learning event
IBM TechXchange Conference October 21-24, 2024 Mandalay Bay - Las Vegas
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))