| Re: PASSING ARRAY FORTRAN DLL TO/FROM VBA EXCEL |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: e p chandlere p chandler Date: Sep 19, 2008 09:49
On Sep 19, 11:28Â am, kis gmail.com> wrote:
> Hello Experts,
>
> It might not be appropriate to address this question here.
>
> I tried to create Fotran dll file and asked VBA to call it. A very
> simple example:
> Let's say we have a Fortran subroutine that multiplies all elements of
> an array by 10.
> Then, VBA Excel has an array as input and calls this (dll) fortran
> subroutine and will get the array multiplied by 10.
>
> I always fail to do so with array as input, however find no problem
> with single-valued variable.
>
> Look forwards to hearing from you.
>
> Thanks,
> Irfan
Try passing the first element of the array as your actual argument:
call FOO(x(1)), etc.
In addition many other things depend on which compiler you are using.
DVF, CVF and IVF have good documentation concerning mixed language
programming.
- e
|