Re: PASSING ARRAY FORTRAN DLL TO/FROM VBA EXCEL
- From: kis <kisitanggang@xxxxxxxxx>
- Date: Mon, 22 Sep 2008 11:56:31 -0700 (PDT)
Thanks so much. I will try it.
On Sep 22, 9:25 am, dpb <n...@xxxxxxx> wrote:
Can you pls give me an example code that does this?
FYI, I use CVF 6.6
There is a section on arrays in mixed-language programming in the CVF
documentation in the mixed language programming section as well as
sample projects for each data type (strings, variables, arrays, UDTs, ...)
One small section contains the following snippet; reading the section
will enlighten greatly...
Handling Arrays and Visual Fortran Array Descriptors
To pass an array from Visual Basic to Fortran, pass the first element of
the array. By default, Visual Basic passes variables by reference, so
passing the first element of the array will give Fortran the starting
location of the array, just as Fortran expects. ...
' In Basic
Declare Sub FORTARRAY Lib "fortarr.dll" (Barray as Single)
DIM barray (1 to 3, 1 to 7) As Single
Call FORTARRAY(barray (1,1))
! In Fortran
- Prev by Date: Re: Surprise
- Next by Date: Re: random ints on a large symmetric interval
- Previous by thread: Re: PASSING ARRAY FORTRAN DLL TO/FROM VBA EXCEL
- Next by thread: "Final" Procedures