Compile this program which has wrong line marked with the arrow
module Mo
CONTAINS
integer function f()
f=1
end function
subroutine abracadabra ! <--- wrong line
end module
!--------------------------
Program Pro
use Mo
Print*,' Nothing to print'
End program
The diagnostics is pretty confusing in this case because points at the wrong line as if something wrong is with integer function F or this function does not have END statement
PROCESSING MODULE [<MO> FTN95/Win32 v7.10.0]
0004) integer function f()
*** INTEGER cannot be declared inside SUBROUTINE block (perhaps missing
CONTAINS or END statement?)
If you change this wrong line with something else like CALL abracadabra
or
abracadabra
the diagnostics is correct and points at the exact offending place.