I want to store a 3D array pointer into a 4D array pointer but I am having some trouble. For example:
real,pointer :: p(:,:,:,:) => null()
integer :: ndims,d
ndims = 3
do d=1,ndims
p(d,:,:,:) => function
end do
Where function
is a function pointer which returns a pointer such as p(:,:,:)
and this works fine. The error I am getting is that Lower bound has to be present
at this line: p(d,:,:,:) => function
, but I have performed this sort of operations before (not with pointers) and it worked okay. What am I missing here?