Passing strings in C-Fortran mixed language programming

Passing strings in C-Fortran mixed language programming

Imagen de marcellocattaneo

Is it possible to pass string arguments from a C calling program to a Fortran subroutine without adding the hidden length argument?

By reading the documentation it would seem that giving the REFERENCE attribute to the string argument, it should be possible, but I haven't been able to make it work.

I would appreciate any example of how this works.

regards, Marcello Cattaneo

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Jugoslav Dujic

See here. The point is that you mustn't specify (LEN=*) in the callee but a specified number (a hard-coded constant or a dummy argument).

Jugoslav www.xeffort.com

Inicie sesión para dejar un comentario.