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

Passing assumed-shape arrays between VB.NET and Fortran

jond
Novice
267 Views
Could somebody clarify the below topic for me please?
A Fortran subroutine residing in a module has an assumed-shape integer array as part of its arguments. How can VB.NET call this subroutine and pass an array successfully? Do I need to use the SafeArrays to handle this situation? Or will using some !DEC$ ATTRIBUTES ... combination or defining an explicit interface on the Fortran side take care of the situation? I am using CVF 6.6.
Thanks for any help,
Jon
0 Kudos
1 Reply
Steven_L_Intel1
Employee
267 Views
Use SafeArrays. I suppose it's theoretically possible for you to construct the descriptor data structure in VB that matches what Fortran wants, but it isn't worth the effort. There are no combination of attributes that will help.

An alternative is to not use assumed-shape arrays and to use adjustable arrays instead, where the bounds are passed in as arguments.
0 Kudos
Reply