Re: strange arguments passing problem (from vba to fortran dll)



On 29 mei, 00:01, formulae translator <liwei19742...@xxxxxxxxx> wrote:
Dear all,

I encounter a strange problem when I am trying to pass arguments from
VBA (excel 2003) to fortran dll (compiled using CVF 6.6b).

debug in cvf environment shows some of the arguments are passed
correctly while some are not.

I attached part of the code here. The arguments passed correctly are
f_max, ppw, ma, para_H2. For other array arguments, only the first
elements are passed correctly.

any comments or suggestions are appreciated.


It looks as if only the scalar variables are passed correctly.
That does seem to make sense to me:

In VB you need to pass arrays like: ByRef array() As Double

In the code you posted the interfaces are missing the ().

Regards,

Arjen

.



Relevant Pages

  • Re: strange arguments passing problem (from vba to fortran dll)
    ... I encounter a strange problem when I am trying to pass arguments from ... debug in cvf environment shows some of the arguments are passed ... In VB you need to pass arrays like: ... You can test that hypothesis by stripping your code down to nothing but variable initialization in VB and the Fortran subroutine call; eliminate everything except for the subroutine arguments. ...
    (comp.lang.fortran)
  • Re: Cant create Device
    ... upgrading to the latest version of the DirectX SDK. ... debug and release runtimes just fine. ... format of my backbuffer wasn't matching the desktop format. ... it should be an array of present parameters, but the sample app and the ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Proper way to "foreach" through a two dimensional array?
    ... > 4) Learn how to debug scripts!!! ... > debug scripts. ... > $Varibl was an Array. ... > You had done the foreach on the 2D array wrong. ...
    (alt.php)
  • Re: Runs on Windows, fails on Linux
    ... > the windows program WITHOUT debug, and guess what, I'm getting the same ... > simply get properly sorted values back with debug, ... 16 MB ints) under Linux on three different machines (sorry, ... I did check the results by iterating over the sorted array and never ...
    (comp.os.linux.development.apps)
  • RE: undefined...
    ... it is my bad with the explanation... ... I used print statements and didn't seem to notice this problem... ... > I have a piece of code which generates array of arrays which then is used to call the ... > Does someone has some suggestions as to how to debug this? ...
    (perl.beginners)