Re: strange arguments passing problem (from vba to fortran dll)
- From: dpb <bozarth.d@xxxxxxxxx>
- Date: 30 May 2007 07:35:44 -0700
On May 30, 7:59 am, dpb <bozart...@xxxxxxxxx> wrote:
....
So, from your original posting,
Dim f_max, ppw As Double
Dim i, j, nt_out, nlayer, n_ma As Long
Static control(7), ma(100) As Long
...
Dim out_a(10000, 100)
each of the variables except in the first three lines are Variants
with the exception of the last one on each line which. In the last
line out_a is also a Variant array.
Boy, I butchered that, didn't I? Sorry...
Each of the variables in the first three lines are Variants
with the exception of the last one on each line which is the type
specified. In the last line out_a is also a Variant array as no type
is provided.
Since I'm here anyway, I'll add a couple of other VB-related
comments...
As you chose to do, one of the recommendations often made in coding
style w/ VB is to make one declaration per line so as to avoid the
inadvertent lack of specific type declarations.
As w/ Fortran's Implicit None being an aid in finding type mismatches,
and typos, etc., VB has Option Explicit that serves much the same
purpose. It is also widely recommended to use that facility
universally. Unfortunately, by the design of VB it wouldn't have
identified the problem here specifically as the variables in question
were Declare'd but the syntax used made them Variant. :(
.
- 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: dpb
- strange arguments passing problem (from vba to fortran dll)
- Prev by Date: Re: overloaded cant be distinguished by return values?
- Next by Date: Re: overloaded cant be distinguished by return values?
- Previous by thread: Re: strange arguments passing problem (from vba to fortran dll)
- Next by thread: user-defined alignment in gfortran
- Index(es):
Relevant Pages
|