Calling C from Fortran

jon.gill_at_metoffice.gov.uk
Date: 03/24/05


Date: 24 Mar 2005 04:41:41 -0800

Hi,

I'm new to Fortran and require some help understanding the capabilities
of Fortran when it comes to calling C/C++ functions. Specifically I
would like to make use of C's memory manipulation functions, in
partucular realloc, memcpy and memmove.

I have writen some F95 code which calls a C function, the function
allocated some mem and populates an array. However the memory is not
availabe to me back in teh Fortran calling function. Any attemp to
access the data result in a seg fault.

Any advice on how to do this would be welcome!

Cheers,

Jon



Relevant Pages

  • Re: Comments on MS Visual Web Developer?
    ... Within its extremely narrow bounds of possible capabilities, ... compiler was the best assembler-monkey in town. ... I was still writing Algol and FORTRAN / Ratfor. ...
    (uk.net.web.authoring)
  • Re: Sunday string puzzler
    ... the FAQ only mentions Fortran '95 ... wmklein ix.netcom.com ... has nothing to do with the capabilities of a language and I won't ...
    (comp.lang.pl1)