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

Passing character array to vb

mnering
Beginner
737 Views
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.

Mike
0 Kudos
2 Replies
leoprex
Beginner
737 Views
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.
0 Kudos
Intel_C_Intel
Employee
737 Views
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.

Sabalan.
0 Kudos
Reply