Xref: utzoo comp.lang.fortran:841 comp.lang.c:11001 Path: utzoo!attcan!uunet!nbires!ncar!husc6!bunny!js07 From: js07@bunny.UUCP (Jack Shaio) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Keywords: language conversions, FORTRAN, c Message-ID: <5907@bunny.UUCP> Date: 29 Jun 88 18:35:50 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <20340@beta.lanl.gov> <1189@mcgill-vision.UUCP> Reply-To: js07@bunny.UUCP (Jack Shaio) Organization: GTE Laboratories, Waltham, MA Lines: 28 In a previous posting, der Mouse replies to: > >>> 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, [...] with: >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. > In fact, the reverse is true: C's ability to define custom data types is no substitute for FORTRAN's COMPLEX type. COMPLEX is a standard, and you can link any packaged math subroutine to your own programs without having to worry about how complex was defined. I recently obtained three FFT algorithms in C from various sources and found three different ways of defining complex (all different from mine). Had I done everything in FORTRAN, a look at the subroutine header would have been enough. The point is that if you plan to do numerical work, and not program every last subroutine from scratch, one COMPLEX data type in FORTRAN is a plus; ten different definitions of complex in C are a pain. Perhaps a remmant of the days when people used computers to solve equations. js