- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the proper format to export a function for use in another language ? Also is there a requirement for byte alignment when using structure.
My sample function might be to take a integer(4) as a parameter, double it and return the value.
Thanks in advance
John
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at the VB--Calls-Fortran sample provided?
As for structures, if you are sharing a structure with another language you will need to understand how that language (VB or whatever) lays out the structure. On the Fortran side, I recommend giving the corresponding derived type the BIND(C) attribute for maximum interoperability. You can deal with any alignment yourself.
As for structures, if you are sharing a structure with another language you will need to understand how that language (VB or whatever) lays out the structure. On the Fortran side, I recommend giving the corresponding derived type the BIND(C) attribute for maximum interoperability. You can deal with any alignment yourself.

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