Xref: utzoo comp.lang.fortran:812 comp.lang.c:10928 Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!mailrus!husc6!cca!g-rh From: g-rh@cca.CCA.COM (Richard Harter) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Keywords: language conversions, FORTRAN, c Message-ID: <29974@cca.CCA.COM> Date: 26 Jun 88 23:58:23 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <20340@beta.lanl.gov> <1189@mcgill-vision.UUCP> Reply-To: g-rh@CCA.CCA.COM.UUCP (Richard Harter) Organization: Computer Corp. of America, Cambridge, MA Lines: 24 In article <1189@mcgill-vision.UUCP> mouse@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.