Passing character array to vb

Passing character array to vb

Is there a way to call a fortran dll from vb and have in the argument list: a character string, an integer, and a character array? It seems that fortran is getting out of bounds on the array. I've tried using the "option base 1" command in vb, and I've used "Dim CharArray(1 to 5) as String. Nothing seems to work.


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I took the habitude to pass directly from VB to Fortran only integers (either 2 or 4 bytes) and floating point numbers. All other cases (strings and arrays of any kinds) I deal with twin definitions of type, end type structures.

Mike, read "Everything you've always wanted to know about VB Arrays of Strings* (*but were afraid to ask)" by Lorri Menard in II-nd issue of the CVF Newsletter. It works for me.


Leave a Comment

Please sign in to add a comment. Not a member? Join today