Xref: utzoo comp.lang.fortran:736 comp.lang.c:10673 Newsgroups: comp.lang.fortran,comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Should I convert FORTRAN code to C? Message-ID: <1988Jun14.214231.6648@utzoo.uucp> Keywords: language conversions, FORTRAN, c Organization: U of Toronto Zoology References: <2742@utastro.UUCP> <20008@beta.UUCP>, <10655@agate.BERKELEY.EDU> Date: Tue, 14 Jun 88 21:42:31 GMT > C is missing many useful intrinsics. I have trouble taking a language > seriously for numeric computation if the language doesn't even know about > absolute values, e.g.: x = abs(x); or signed numbers, e.g. x = +5; > Both statements are illegal in C. Curious, my compiler compiles the first one just fine :-). The second is admittedly a bit of a nuisance, but hardly a disaster. In any case X3J11 has fixed both: abs is one of the potentially-intrinsic functions defined in the standard, and unary plus is provided. > [Much moaning and groaning about the lack of exponentiation, an operator > whose general case is (a) notoriously hard to define well, and (b) very > seldom used.] > Actually, C does not have a concept of intrinsic at all. X3J11 (ANSI-to-be) C does. > (running lint is a hassle). Ah, we come to the heart of it: the man wants to convert to C without having to learn anything new, go to any trouble, or buy modern compilers. My nose bleeds for him. -- Man is the best computer we can | Henry Spencer @ U of Toronto Zoology put aboard a spacecraft. --Von Braun | {ihnp4,decvax,uunet!mnetor}!utzoo!henry