Re: [OT] convert 'C' code to 'Fortran'
From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 11/11/04
- Next message: dandelion: "Re: printing a pointer's value"
- Previous message: Peter Monsson: "Re: special character to strings and vice versa"
- In reply to: Michael Mair: "[OT] convert 'C' code to 'Fortran'"
- Next in thread: Keith Thompson: "Re: [OT] convert 'C' code to 'Fortran'"
- Reply: Keith Thompson: "Re: [OT] convert 'C' code to 'Fortran'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Nov 2004 15:23:15 GMT
In <2vfbalF2knu5cU1@uni-berlin.de> Michael Mair <Michael.Mair@invalid.invalid> writes:
>sam wrote:
>
>> Hi,
>> Can anyone help me find a software that can convert a code in 'C'
>> to 'Fortran77/90' automatically?
>
>This is not really on-topic.
>However, there is a slightly more topical version: Why fix something
>that is not broken?
>C modules can communicate with fortran modules.
>Now the problem is just how to fit the two together.
>Google for "mix fortran and C". It basically comes down to
>providing interfaces, creating the right headers and intelligent
>makefiles.
The real problem is that the solution is not portable. The details of
interfacing C and Fortran are highly system specific. Everything could
just work by "magic", as was the case under VAX/VMS, but many other
platforms require the C code to have inside knowledge about the workings
of the Fortran compiler and/or vice versa.
The best attempt at hiding these details was made by the cfortran.h
project: http://www-zeus.desy.de/~burow/cfortran/
IIRC, it is only the last Fortran standard that addresses the issue.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Currently looking for a job in the European Union
- Next message: dandelion: "Re: printing a pointer's value"
- Previous message: Peter Monsson: "Re: special character to strings and vice versa"
- In reply to: Michael Mair: "[OT] convert 'C' code to 'Fortran'"
- Next in thread: Keith Thompson: "Re: [OT] convert 'C' code to 'Fortran'"
- Reply: Keith Thompson: "Re: [OT] convert 'C' code to 'Fortran'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|