Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP (D Gary Grady) Newsgroups: net.lang.c Subject: Re: C vs. FORTRAN (was: What should be added to C) Message-ID: <1621@ecsvax.UUCP> Date: Wed, 28-May-86 11:21:46 EDT Article-I.D.: ecsvax.1621 Posted: Wed May 28 11:21:46 1986 Date-Received: Thu, 29-May-86 07:33:49 EDT References: <1594@ecsvax.UUCP> <853@bentley.UUCP> Reply-To: dgary@ecsvax.UUCP (D Gary Grady) Organization: Duke U Comp Ctr Lines: 37 Summary: Argumentative rantings In article <853@bentley.UUCP> kwh@bentley.UUCP (KW Heuer) writes: >In article <1594@ecsvax.UUCP> ecsvax!dgary (D Gary Grady) writes: [listing advantages of FORTRAN over C for scientific work] >>o A richer set of floating point operators, including exponentiation and >> the so-called "in-line" functions (many of which ARE in C). > >I think you mean "builtin" rather than "inline". I don't even consider that >a significant difference, much less an advantage of FORTRAN. No, I meant "inline." That's a standard FORTRAN term and I'm surprised you're not familiar with it. Anyway, the in-line functions in FORTRAN include absolute value, imaginary part (of a complex number), real part (ditto), complex conjugate, explicit truncation, explicit rounding, mod, sign, positive difference, type conversion, maximum, minimum, and various Boolean ones. As I said before, many of these are in C as well, but the FORTRAN set is certainly richer in those used for scientific coding. Whether you consider it a significant difference depends on the kind of programming you do. As for an explicit exponentiation operator, your own comments about C's serious limitations constitute an adequate justification for its addition to the language, I'd say. >>o A way of passing different-sized multidimensional arrays to the same >> subroutine. >Again, this is merely a syntactic quibble -- what FORTRAN does is equivalent >to the one-dimensional "trick", but it's hidden from the user. Quibble? We're talking about a hard-coded subscript calculation every time you refer to an array element. If it isn't hard to add to the language (and I agree it shouldn't be), why not add it (as long as we are talking about language modifications - I understand the view that we should beware Creeping Featurism). Interesting suggestion you make that we might as well extend this to malloc'ed arrays. Hmm... -- D Gary Grady Duke U Comp Center, Durham, NC 27706 (919) 684-3695 USENET: {seismo,decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary