In article <7abee4bb-b18a-4680-817b-7e76aed40...@c2g2000yqi.googlegroups.com>, sturlamolden <sturlamol...@yahoo.no> wrote: > >> Precisely. =A0And the kludge does NOT work under all circumstances, >> which is why I said that it doesn't work very well. > >Do you have an example?
I gave you one. Also see below. >> Consider, for example: >> >> =A0 =A0 SUBROUTINE Fred (X) BIND(C) >> =A0 =A0 CHARACTER*(*) :: X >> =A0 =A0 END SUBROUTINE Fred > >Obviously that is not allowed, because C does not know anything about >Fortran strings. How should a C compiler pass the correct data >structure to Fred? Precisely. The reason I asked that question is that it would be possible to extend the standard to make it possible in a portable fashion. You might also like to consider the converse problem: how to write a Fortran function that takes a C string of arbitrary length and uses it. Regards, Nick Maclaren. -- http://mail.python.org/mailman/listinfo/python-list