Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29264 Discussions

Visual Fortran DLL for Visual Basic

deeptii
Beginner
720 Views
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~

thanks!
0 Kudos
3 Replies
deeptii
Beginner
720 Views
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?
0 Kudos
durisinm
Novice
720 Views
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.

Mike
0 Kudos
gfthomas8
Novice
720 Views
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.

HTH,
Gerry T.
0 Kudos
Reply