home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16282 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.9 KB  |  44 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!stanford.edu!CSD-NewsHost.Stanford.EDU!CS.Stanford.EDU!tsmith
  3. From: tsmith@CS.Stanford.EDU (Todd Michael Smith)
  4. Subject: Re: Fortran to C conversion: Why bother?
  5. Message-ID: <1992Nov10.180818.4858@CSD-NewsHost.Stanford.EDU>
  6. Sender: news@CSD-NewsHost.Stanford.EDU
  7. Organization: Computer Science Department, Stanford University.
  8. References: <1992Nov9.131601.167@gems.vcu.edu> <BxIEwH.F59@netnews.jhuapl.edu>
  9. Date: Tue, 10 Nov 1992 18:08:18 GMT
  10. Lines: 32
  11.  
  12. In article <BxIEwH.F59@netnews.jhuapl.edu>,
  13.           ygor@aplexus.jhuapl.edu (Daniel E. White  (F2C)) writes:
  14. |> In article <1992Nov9.131601.167@gems.vcu.edu>, hleaves@gems.vcu.edu writes:
  15. |> |> I was wondering why anyone would bother using the f2c (or
  16. |> |> similar) program to translate fortran code directly into C. All
  17. |> |> you end up with is C code that exactly mimics the functionality
  18. |> |> of the original fortran code. Its not as if the translating
  19. |> |> program rewrites your algorithms to use the parts of C that make
  20. |> |> C really useful. Its just fortran code expressed in C. What's
  21. |> |> the point?  If you're going to write programs in fortran, use a
  22. |> |> fortran compiler. If you want to use the features of C, learn C
  23. |> |> and use a C compiler. Using f2c doesnt give you any of the
  24. |> |> advantages of designing and writing the original program in C.
  25. |> |>
  26. |> |> -Hugh
  27. |> 
  28. |> I second that.  I've seen too much C source that looks like FORTRAN with
  29. |> semi-colons appended to the line endings.
  30. |> 
  31.  
  32. What if you don't have a FORTRAN compiler?
  33.  
  34. What if you have a special C compiler (bought or built yourself) that
  35. performs optimizations that you would like to use on FORTRAN code also?
  36.  
  37. What if you want to move a program into C, but would rather automatically
  38. translate and then modify the code than rewrite or translate the whole
  39. thing by hand?
  40.  
  41. -- 
  42. Todd Smith                                    tsmith@cs.stanford.edu
  43.                     Life is a word problem.
  44.