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

VB.NET calling IVF passing structure? Multiple strings?

kvmavis
Beginner
669 Views

I have a project that involves writing a VB.NET GUI as a front end to a VAX Fortran legacy app that I'm migrating to IVF. The legacy app uses structures extensively. I would love to be able to fill the structures in VB and pass them to the IVF code. The structures have a mix of data types, including strings.

Thus far I have been able to pass structures with a mix of numeric data types into IVF, but not when I include a string in the structure. I have had no luck passing them back out. Has anyone had succes doing this? If so, can you share your technique?

Looking for a workaround, I tried passing multiple string variables into IVF. No luck there either. I can pass in a single string, but not two or more. Again, has anyone had any luck with this?

0 Kudos
3 Replies
Steven_L_Intel1
Employee
669 Views
You must give the character variables the REFERENCE attribute on the Fortran side to prevent Fortran from expecting a string length to be passed.
0 Kudos
kvmavis
Beginner
669 Views

Way too easy. That solved my multiple string issue. Thanks.

Any suggestions for the structure issue? Other than "Don't" - :-).

0 Kudos
Steven_L_Intel1
Employee
669 Views
It's been too long since I've tried a structure to see what happens. What you may find is that structures of strings contain pointers to "BSTRING" structures that require additional code to decode. I'd expect that structures of numerics should not be difficult, though you may have to be concerned with alignment padding.
0 Kudos
Reply