Uninformative error message
Arjen Markus
arjen.markus895@gmail.com
Fri Oct 29 14:33:00 GMT 2010
Hello,
I was experimenting a bit with a small program and I made a (now)
obvious mistake.
The compiler detected this mistake correctly, but the message was
quite puzzling:
"Unclassifiable statement", pointing to the "f"
Here is the program:
! gfortran gives a rather uninformative message:
! Unclassifiable statement
!
module functions
implicit none
type dataType
real, pointer :: x
real, pointer :: y
endtype dataType
contains
real function f(i,j,datav)
integer :: i, j
type(dataType) :: datav
f = datav%x(i) + datav%y(j)
end function f
end module functions
The mistake was of course that x and y are not arrays, but it would be
helpful if the compiler could
provide an error message with that information.
Regards,
Arjen
More information about the Fortran
mailing list