Should I convert FORTRAN code to C?

Richard Harter g-rh at cca.CCA.COM
Mon Jun 27 09:58:23 AEST 1988


In article <1189 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse) writes:

>>> ii) You can define your own data structures,
>> This capability is NOT an adequate replacement for the complex data
>> type.  Complex is more than just a pair of reals, [...]

>It's both more and less powerful.  To put it another way, FORTRAN's
>COMPLEX data type is NOT an adequate replacement for the ability to
>define custom data types.

The CDC 3600 version of fortran II had an interesting wrinkle.  You could
define your own data types with arithmetic operators.  The compiler would
generate calls to functions which you supplied.

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.  C has 
characters and pointers as primitives; fortran has complex as a primitive.
C also has structures as a primitive.  
-- 

In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die.
	Richard Harter, SMDS  Inc.



More information about the Comp.lang.c mailing list