- #1
fys iks!
- 40
- 0
Hi, I am beginning to learn FORTRAN and am a bit confused with the error i am getting. Here is my code:
program main
IMPLICIT NONE
integer :: limit
WRITE(*,*) "Please enter limit: "
READ(*,*) limit
integer :: allnums(limit)
!
! do i=1,limit
!
! allnums(i) = 0
!
! end do
end program main
all i am trying to do is create an interger array that is the "limit" long. when trying to compile i get the error:
main.f90:10.25:
integer :: allnums(limit)
1
Error: Unexpected data declaration statement at (1)
any ideas?
thanks
program main
IMPLICIT NONE
integer :: limit
WRITE(*,*) "Please enter limit: "
READ(*,*) limit
integer :: allnums(limit)
!
! do i=1,limit
!
! allnums(i) = 0
!
! end do
end program main
all i am trying to do is create an interger array that is the "limit" long. when trying to compile i get the error:
main.f90:10.25:
integer :: allnums(limit)
1
Error: Unexpected data declaration statement at (1)
any ideas?
thanks