[comp.binaries.ibm.pc.d] Fortran77--->C

erhugo@magnus.acs.ohio-state.edu (Eric R Hugo) (06/15/91)

Has anyone out there had any experience translating algorhythms adapted
to work in Fortran to work in C or C++.  Is this possible or are the
languages soooo different that it would be easier to not even look at
the Fortran source code?  Any pointers would be appreciated. ;-)

-- 
   _______________________________________________________________________
   | Eric R. Hugo                             email: Hugo.1@osu.edu      |
   | Dept. Of Molecular Genetics              ATTnet: (614) 292-6804     |
   | The Ohio State University                :If it can't be fixed with |

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (06/17/91)

In article <1991Jun15.114003.23662@magnus.acs.ohio-state.edu> erhugo@magnus.acs.ohio-state.edu (Eric R Hugo) writes:
| Has anyone out there had any experience translating algorhythms adapted
| to work in Fortran to work in C or C++.  Is this possible or are the
| languages soooo different that it would be easier to not even look at
| the Fortran source code?  Any pointers would be appreciated. ;-)

  AT&T has released the code for the unix f77 compiler, which compiles
FORTRAN into C code. That certainly sounds like a start. I pulled it at
work and got it working on a Sun, and was intending to port it to DOS
for use with djgcc, so people would have a free FORTRAN, too.

  Unfortunately my job has changed again, and I have no time to
continue, nor at that time disk space to save. One of the TP guys can
tell you where to find it, it's possible you could use it on a unix
system and do something with the C code. The code emitted is not
beautiful, nor is it always readable.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me

ressler@CS.Cornell.EDU (Gene Ressler) (06/17/91)

In article <4092@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes:
>In article <1991Jun15.114003.23662@magnus.acs.ohio-state.edu> erhugo@magnus.acs.ohio-state.edu (Eric R Hugo) writes:
>| Has anyone out there had any experience translating algorhythms adapted
>| to work in Fortran to work in C or C++.  Is this possible or are the
>| languages soooo different that it would be easier to not even look at
>| the Fortran source code?  Any pointers would be appreciated. ;-)
>
>  AT&T has released the code for the unix f77 compiler, which compiles
>FORTRAN into C code. That certainly sounds like a start...

FYI from Kieth Petersen:

>I have uploaded to SIMTEL20:
>
>pd1:<msdos.fortran>
>F2C-SRC.ZIP     Source for f2c, Fortran 77-to-C converter
>F2C-EXE.ZIP     Binaries & Libs for f2c Fortran to C converter
>
>This is AT&T's f2c project--A portable fortran 77 to C converter that
>is the closest thing I know of to free fortran on an MSDOS machine.
>The sources were FTP's from research.att.com, and compiled with
>virtually no changes with MSC 5.1.  Both small and large model
>libraries are included with the executable.  Because of DOS's small
>memory size, very large programs may run out of space during the
>conversion, but I found that all but the largest fortran programs will
>convert properly.  The C produced is very portable K&R C, with options
>to produce ANSI C or C++.
>
>I hope they can be useful.
>
>Regards,
>
>David Fenyes                                 dfenyes@thesis1.med.uth.tmc.edu
>University of Texas Medical School           Houston, Texas