Should I convert FORTRAN code to C?

hutchson at convex.UUCP hutchson at convex.UUCP
Sat Jul 2 04:33:00 AEST 1988


>Richard Harter, SMDS  Inc., writes:
>The issue really is -- what data types are supported by the language as
>primitives.  Any type which is a primitive language type can be compiled
>much more efficiently than one which must be built up by hand.

This is incontrovertable.

>C has
>characters and pointers as primitives; fortran has complex as a primitive.
>C also has structures as a primitive.  

This is most inaccurate.  C supports multiple lengths of integers (including a
VERY short length unsuitable for anything larger than an ASCII character.)
C "char's" are really wierdly-represented tiny ints.  C has a well-defined
library of operations on null-terminated character strings; but only with the
advent of ANSI C will it be possible to consider character strings primitive.
Fortran, on the other hand, DOES have character strings as primitives, and
good compilers can generate inline code for many string operations.
In addition, fortran has multiple lengths of floating-point values--ANSI C
is adding this, I think.



More information about the Comp.lang.c mailing list