Given a test program source file (fixed form) containing #include directives starting in column-1, FTN95 refuses to compile the file.
program fppbug
implicit none
#include 'size.inc'
print *,NSIZE
end program
where the included file contains the single line
integer :: NSIZE = 100
FTN95 says:
ftn95 /CFPP fppbug.f
[FTN95/Win32 Ver. 8.92.0 Copyright (c) Silverfrost Ltd 1993-2022]
ERROR S:\LANG\ftn95\fppbug.F 3: Invalid characters in label field of FIXED format source
ERROR S:\LANG\ftn95\fppbug.F 3: Statement not recognised
ERROR S:\LANG\ftn95\fppbug.F 4: NSIZE must appear in a type declaration because IMPLICIT NONE has been used
3 ERRORS [<FPPBUG> FTN95 v8.92.0]
*** Compilation failed
The usual convention for C processor directives in fixed form (Fortran 77) source is that the directives start in column-1. For example, see the Sun/Oracle page https://docs.oracle.com/cd/E19205-01/820-4180/man1/fpp.1.html , where it says:
ERROR S:\LANG\ftn95\fppbug.F 3: Invalid characters in label field of FIXED format source ERROR S:\LANG\ftn95\fppbug.F 3: Statement not recognised ERROR S:\LANG\ftn95\fppbug.F 4: NSIZE must appear in a type declaration because IMPLICIT NONE has been used 3 ERRORS [<FPPBUG> FTN95 v8.92.0] *** Compilation failedThe usual convention for C processor directives in fixed form (Fortran 77) source is that the directives start in column-1. For example, see the Sun/Oracle page https://docs.oracle.com/cd/E19205-01/820-4180/man1/fpp.1.html , where it says: [quote:b723e267c5]All fpp directives start with the hash symbol (#) as the first character on a line.
I think that it is only the output of the preprocessor that should be required to conform to Fortran-77 rules regarding columns 1-6 and 72-80, not the directives themselves.
Note: The example code is silly, but the issue exists with older Fortran 77 packages such as MINUIT from CERN. See, for example, lines 12 to 15 in the file https://github.com/ramos/minuit/blob/master/minuit.F .