Hello again,
I have another problem connected with the previous one. Since I cannot set values of the array as previously (with the usage of DATA structure), I had an idea with declaring every value in the array seprarately. The code fragment looks like this:
Code: Select all
MODULE interpUtils
Use DefUtils
Implicit None
INTEGER, PARAMETER :: arr_up_bnd = 100, arr_low_bnd = 1
REAL(kind=dp), DIMENSION(arr_low_bnd:arr_up_bnd,arr_low_bnd:arr_up_bnd) :: perme_array, elcond_array
!Here goes data initialization (generated with F90WriteX):
perme_array(1,1)=1d0
perme_array(2,1)=1d0
perme_array(3,1)=1d0
perme_array(4,1)=1d0
...
When I try to compile the module I recive errors like:
"Error: Unexpected assignment statement in MODULE at (1)"
I googled the error and had found an explanation, that
"It is not allowed to have executable statements by themselves in a module. They need to be inside a procedure, or in the main program."
on the other hand I am using those variables (perme_array and elcond_array) in all subrutines my module so I would like to avoid need to decalre them separetly. Can anyone give some advice how to declare an 100x100 array once in whole module?
With best regards,
Paweł