- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
HTH,
Gerry T.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page