home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!mccall
- From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
- Subject: Re: Fortran to C conversion: Why bother?
- Message-ID: <1992Nov11.172747.1959@mksol.dseg.ti.com>
- Organization: Texas Instruments Inc
- References: <1992Nov9.131601.167@gems.vcu.edu> <20849@fritz.filenet.com>
- Date: Wed, 11 Nov 1992 17:27:47 GMT
- Lines: 41
-
- In <20849@fritz.filenet.com> scotth@felix.filenet.com (Scott Hopson) writes:
-
- >Keywords
- >In article <1992Nov9.131601.167@gems.vcu.edu> hleaves@gems.vcu.edu writes:
- >>I was wondering why anyone would bother using the f2c (or similar) program to
- >>translate fortran code directly into C. All you end up with is C code that
- >>exactly mimics the functionality of the original fortran code. Its not as if
- >>the translating program rewrites your algorithms to use the parts of C that
- >>make C really useful. Its just fortran code expressed in C. What's the point?
- >>If you're going to write programs in fortran, use a fortran compiler. If you
- >>want to use the features of C, learn C and use a C compiler. Using f2c doesnt
- >>give you any of the advantages of designing and writing the original program
- >>in C.
-
- >Let's say your company was moving from a system like an IBM running MVS or a
- >DEC running VMS or some other similar beast to a Unix machine. You had lots of
- >OLD code which was written in FORTRAN but your new environment was going
- >strictly C and you knew there might be a need to maintain the OLD code, but you
- >lost all your Hard Core Fortran Oldtimers.
-
- >What would you decide to do?
-
- >Many companies think seriously about converting their old code into new code,
- >even if the functionality is the same. This is because they usually want the
- >same functionality but with the opportunity to enhance old systems.
-
- The problem with this decision is that the code resulting from
- automatic translations is usually something less than maintainable, so
- you would still have to either maintain the FORTRAN or reimplement in
- maintainable C. Converters are useful for those cases where you need
- to get the first release of a product out the door when you are in a
- new environment, but IMHO trying to maintain the output of a converter
- after chucking the original code is rather like maintaining object
- after chucking the source code. It is somewhat more difficult than taking
- the time to reimplement properly in the new language.
-
- --
- "Insisting on perfect safety is for people who don't have the balls to live
- in the real world." -- Mary Shafer, NASA Ames Dryden
- ------------------------------------------------------------------------------
- Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
-