Passing strings in C-Fortran mixed language programming

Passing strings in C-Fortran mixed language programming

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
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Leave a Comment

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