Xref: utzoo comp.lang.fortran:4115 comp.lang.c:34158 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Fortran vs. C for numerical work Summary: unfair to both Message-ID: <4356@goanna.cs.rmit.oz.au> Date: 23 Nov 90 06:08:46 GMT References: <1990Nov22.051446.1871@ccu.umanitoba.ca> Followup-To: comp.lang.fortran Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 38 In article <1990Nov22.051446.1871@ccu.umanitoba.ca>, salomon@ccu.umanitoba.ca (Dan Salomon) writes: > The ANSI standard for function prototypes will > give C an edge over FORTRAN in parameter mismatch errors, but > that improvement is relatively recent and not enforced yet. There are several checkers around for Fortran: several Fortran "lint" programs (a perennial topic in this newsgroup), PFORT, something in ToolPack. > 3) There is a large body of well tested mathematical packages available > for FORTRAN, that are not yet available in C. Given the existence of f2c, any math package available _in_ Fortran is effectively available in C, and in UNIX and VMS at least, it isn't hard to call anything that could have been called from Fortran from C. > 4) FORTRAN still gives the option of using single precision floating > calculations for speed and space optimizations, whereas C forces > some calculations into double precision. This is not true of ANSI C, and many vendors provided something like Sun's "-fsingle" as an option for years before that. It is also worth noting that on a number of machines, single-precision calculations are not faster than double precision. > 1) C allows recursive functions, whereas portable FORTRAN doesn't. > Recursive functions can often solve a problem more clearly > than iterative methods, even if they are usually less efficient. Solved in Fortran Extended. > 2) FORTRAN has no dynamic array allocation. Although C has dynamically > allocated arrays, they are not trivial to describe or allocate. Solved in Fortran Extended. Some vendors have provided pointers of some sort for several years, and it is easy to fake on some systems. -- I am not now and never have been a member of Mensa. -- Ariadne.