gittenlucky
Programmer
I have an array that I create, but when I pass it, it loses the indexing properties. example:
-main program-
real, allocatable, dimension) :: peanut
...
Allocate(peanut(5:16))
...
call subroutine butter(peanut)
...
real, intent(in out), dimension) :: peanut
...
-end subroutine
-end program
so the array peanut should index from 5:16, but when I try to access it in the subroutine, it indexes from 1:12. The data passes OK, but the index is reset to start at 1. Does anyone know how I can fix this? Thanks!
-main program-
real, allocatable, dimension) :: peanut
...
Allocate(peanut(5:16))
...
call subroutine butter(peanut)
...
real, intent(in out), dimension) :: peanut
...
-end subroutine
-end program
so the array peanut should index from 5:16, but when I try to access it in the subroutine, it indexes from 1:12. The data passes OK, but the index is reset to start at 1. Does anyone know how I can fix this? Thanks!