Re: strange arguments passing problem (from vba to fortran dll)
- From: Arjen Markus <arjen.markus@xxxxxxxxxx>
- Date: 30 May 2007 00:32:13 -0700
On 30 mei, 06:03, Brooks Moses <bmoses-nos...@xxxxxxxxxxxxxxxxxx>
wrote:
formulae translator wrote:
Thanks for Louis' reply
I found the reason by playing with VBA part.
I can NOT define more than one array in one line.
It's so strange because I never heard anyone mentioned this.
The adjusted code should be following:
Dim f_max, ppw As Double
Dim i, j, nt_out, nlayer, n_ma As Long
Dim control(7) As Long
Dim ma(100) As Long
[...]
I don't know very much about VBA, but looking at that syntax, I wonder
if the problem isn't that to define more than one array on the same
line, you'd have to do it like:
Dim control(7) As Long, ma(100) As Long
and that if you only do
Dim control(7), ma(100) As Long
then ma gets defined properly, but control gets typed as whatever VBA's
implicit typing is ("variant", I think).
Oh, a type "variant" would be a very bad idea!
It is a "polymorphic" type that only VB can handle properly -
a bit like array descriptors for assumed-shape arrays:
you can not (easily/portably) pass these to, say, C.
Quite likely that that is the problem.
Regards,
Arjen
.
- Follow-Ups:
- Re: strange arguments passing problem (from vba to fortran dll)
- From: Brooks Moses
- Re: strange arguments passing problem (from vba to fortran dll)
- References:
- strange arguments passing problem (from vba to fortran dll)
- From: formulae translator
- Re: strange arguments passing problem (from vba to fortran dll)
- From: Arjen Markus
- Re: strange arguments passing problem (from vba to fortran dll)
- From: formulae translator
- Re: strange arguments passing problem (from vba to fortran dll)
- From: Louis Krupp
- Re: strange arguments passing problem (from vba to fortran dll)
- From: formulae translator
- Re: strange arguments passing problem (from vba to fortran dll)
- From: Brooks Moses
- strange arguments passing problem (from vba to fortran dll)
- Prev by Date: Re: F77 & WIN XP
- Next by Date: Re: strange arguments passing problem (from vba to fortran dll)
- Previous by thread: Re: strange arguments passing problem (from vba to fortran dll)
- Next by thread: Re: strange arguments passing problem (from vba to fortran dll)
- Index(es):
Relevant Pages
|