Kipp Graham said:
>I wish to call a C function in a vendor library (i.e I can't change the
>C side of the process). The function requires a character array of the C
>form char **string.
Well, of course you can change the C side of the process, by using a wrapper
function. In fact I would recommend this, as any solution is likely not to
be portable. For a start, different Fortran compilers may use different naming
conventions (as seen from C).
>What Fortran structures do I need to do this?
>
>Because I cannot modify the C function, I think will need to use some
>form of TRANSFER or (horrors!) EQUIVALENCE to pass the string array as
>an INTEGER*1 array.
There is at least one compiler that does not have an INTEGER*1 data type; but
in any case, internal representations may vary.
I'd strongly recommend you work out a desirable Fortran interface that is
translatable to relatively simple C - and localise the system dependencies
in the wrapper function.
Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
([log in to unmask])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|