dim test(),testvar2 as double
n = fortran_function(test, ...)
testvar2=test(1)
Fortran功能:
integer function fortran_function(test, ...)
REAL(KIND=8), INTENT(INOUT), ALLOCATABLE :: test(:)
allocate(test(1))
test(1)=...
...
end function fortran_function
这样做不会为数组分配空间,但它会使用ExecutionEngineException崩溃我的VB.NET应用程序。 我的问题是,如何将我在VB.NET中通常使用的ReDim命令“外包”到Fortran函数中(这是必要的,因为在那里计算了数组大小)。
马丁