If your Fortran program contains C preprocessor directives and you
do not want to use any additional C preprocessor directives in the
kfort
command line, use the Fortran compiler qualifiers
/cpp
, as follows:
kfort /cpp myprog.f
The /cpp
qualifier causes the C preprocessor to run on
your Fortran program before compilation.
In the event you want to use C preprocessor directives in
the kfort
command line, you must also include
the C preprocessor qualifier /C
to avoid errors
resulting from C comment lines. For example, in the following
kfort
command line where /Dfoo
is a
C preprocessor qualifier, you must include /C
, as
follows:
kfort /cpp /C /Dfoo myprog.f
The kfort
driver does not set the /C
qualifier when you use C preprocessor directives in the command
line. Without the /C
qualifier, an error message
results from the following program lines:
PRINT 5 5 FORMAT(//,'above are 2 blank lines') end
Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.