Passing strings in C-Fortran mixed language programming

Passing strings in C-Fortran mixed language programming

imagem 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

2 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem 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

Faça login para deixar um comentário.