Uwe
Joined: 15 Apr 2021 Posts: 1
|
Posted: Fri Apr 16, 2021 8:46 am Post subject: FTN95 fails for include line after CONTAINS |
|
|
In a larger project the compiler fails in compiling source code having includes after the CONTAINS statement, so I did a test with a small program:
program including
implicit none
integer :: a, b, c
a = 1
b = 2
call add(a,b,c)
write(*,*) a, b, c
contains
include 'add.f90'
end program including
The include file contains:
subroutine add(aa,bb,cc)
implicit none
integer :: aa,bb,cc
cc = aa+bb
end subroutine add
The error message:
[FTN95/Win32 Ver. 8.70.0 Copyright (c) Silverfrost Ltd 1993-2020]
NO ERRORS [<INCLUDING> FTN95 v8.70.0]
0003) integer :: a, b, c
*** Unexpected end of file
gfortran and Intel Fortran compile without problems. FTN95 compiles, if the source of the include file is put directly in the main program. |
|