Message-ID: <de2296f30812100835j2833ea97i854bab7621b7ae8c@mail.gmail.com>
Date: 2008-12-10T16:35:38Z
From: Gunnar Hellmund
Subject: .Fortran and memory allocation
Hi
I know it is not recommended to use dup=FALSE with .Fortran calls, but ...
1)
Is it possible to allocate memory for a large array of type double or
integer without initializing the array
(and how is this done)
2)
If the answer to question 1) is 'Yes':
Is it possible to pass the uninitialized array to a subroutine in a
Fortran DLL (with dup=FALSE) including the dimensions (n1, ... , n3)
in the call and then initialize the array in Fortran:
subroutine arraycall(myarray,dimensions)
integer, intent(in) :: dimensions(3)
double precision :: myarray(dimensions(1),dimensions(2),dimensions(3))
myarray=0.0
end subroutine arraycall
best
Gunnar