Hi,
following problem: I want to fill an array within a module. My Code:
module myModule
implicit none
save
integer :: l
integer, parameter :: nt = 4524
real*8, parameter :: tMin = 0.0d0
real*8, parameter :: tMax = 6.0d0
real*8, parameter :: dt = (tMax - tMin) / (nt - 1)
real*8, dimension(nt) :: t
do l = 1, nt
t(l) = tMin + (l - 1) * dt
end do
end module myModule
I get an error: This statement must not appear in the specification part of a module
Is it not possible to fill that array in the module?
Thanks for any help
following problem: I want to fill an array within a module. My Code:
module myModule
implicit none
save
integer :: l
integer, parameter :: nt = 4524
real*8, parameter :: tMin = 0.0d0
real*8, parameter :: tMax = 6.0d0
real*8, parameter :: dt = (tMax - tMin) / (nt - 1)
real*8, dimension(nt) :: t
do l = 1, nt
t(l) = tMin + (l - 1) * dt
end do
end module myModule
I get an error: This statement must not appear in the specification part of a module
Is it not possible to fill that array in the module?
Thanks for any help