Visual Fortran DLL for Visual Basic

Visual Fortran DLL for Visual Basic

hi! i am converting some math fortran codes into dlls so i can use them in VB and Excel. however, i don't know what data type to use in VB to match VF's "Complex" datatype. also, i don't know what to put for declaration like "double precision dx(*)" into data type in VB. can someone please give me some light here~


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

i read that the Complex data type can be handled in C with a user-defined data type. can one do the same in VB? in the mixed programming language guide it didn't have that entry for VB, however, there is user-defined data type as well in VB, no? would it also work if one is to define like in C?

It's not as easy as it first looks to implement complex in VB via a UDT. You could try, at some price, VBMatrix libtary from Matlab.

Gerry T.

The equivalent of Fortran's DOUBLE PRECISION data type in Excel VBA is Double, but I can't recall seeing a declaration of DOUBLE PRECISION var_name(*) in Fortran as you mention below. Pass VBA_dble_var(1) from VBA to Fortran. VBA's default passing mechanism is by reference, so it matches up with Fortran's.


Leave a Comment

Please sign in to add a comment. Not a member? Join today