Fortran to C translation

Art Dederick art at felix.UUCP
Wed Aug 9 01:34:19 AEST 1989


In article <7990 at spool.cs.wisc.edu> g-wardal at rocky.CS.WISC.EDU (John F. Wardale) writes:
>We need to translate some Fortran programs into C.

It seems this request is becomming more frequent so I will give my
$.02 on the subject.

On most BSD systems there is a program called "struct" that takes
Fortran source and converts it to RATFOR source.  I have found this to
be a good start on converting Fortran to C since RATFOR is like C in
many ways, at least enough to cut down on the manual manipulations
that make this conversion possible.

I admit it is not much but when commercial products to do the translation
cost in the tens of thousands of $'s, this is a cheap alternative.
I'm not sure of the state of Fortran to C translators to date but it
seems to me some manual modifications will still be required for even
the best translators.  Using struct provides the bulk translation and
the fine tuning can proceed with the hand changes needed to translate
RATFOR to C.

It would be nice if UCB could release struct to the public domain so
it could be used as the start of a "real" Fortran to C translator.
Anyone from UCB listening in have any comments?

D. Art Dederick
FileNet Corp.
3565 Harbor Blvd.
Costa Mesa, CA 92626
(714) 966-3618
{ccicpg,hplabs,oliveb,spsd,zardoz}!felix!art



More information about the Comp.lang.c mailing list