- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
An alternative is to not use assumed-shape arrays and to use adjustable arrays instead, where the bounds are passed in as arguments.
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