Should I convert FORTRAN code to C?

Henry Spencer henry at utzoo.uucp
Wed Jun 15 07:42:31 AEST 1988


> 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



More information about the Comp.lang.c mailing list