I am a fortran beginner and writing a very simple program, compiler GNU fortran.
program t1
implicit none
real :: a, b
a=35.4
CHARACTER (LEN=*) :: str = 'This is a test program'
REAL, PARAMETER :: pi = 3.14
WRITE (*,*) a
WRITE (*,*) str
WRITE (*,*) pi
end program
I got error Error: Unexpected data declaration statement at line 3
Error: Symbol 'a' has no IMPLICIT type line 4 and similar for line 8. I am not getting what is going wrong here. Can someone comment?