silverfrost Site Admin
Joined: 29 Nov 2006 Posts: 191 Location: Manchester
|
Posted: Tue Sep 07, 2004 9:48 pm Post subject: Passing Strings From Visual Basic to Fortran |
|
|
When passing strings from VB into Fortran the following should be done:
* The string should be passed ByVal from Visual Basic, the callee can still alter this string.
* If the string length is known then it should be declared as such in the Fortran and this length string should be passed from the VB.
* If the string length is unknown then it should be declared as character (*) in the Fortran and some extra arguments need to be passed from the VB. These arguments are the string lengths. The string lengths should be passed on the end of the argument list, in the order in which any strings in the list appear. They should be passed by value as 4 byte integers. |
|