Path: utzoo!attcan!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.lang.fortran Subject: Re: What is the FORTRAN for ? Keywords: FORTRAN Message-ID: <10583@batcomputer.tn.cornell.edu> Date: 26 Jul 90 17:41:21 GMT References: <1990Jul25.174153.16896@ecn.purdue.edu> <11029@chaph.usc.edu> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 26 In article <11029@chaph.usc.edu> ajayshah@aludra.usc.edu (Ajay Shah) writes: >Honestly, I can't imagine why Fortran is half as popular as it >is. All old libraries can be linked into Pascal/C programs these >days, which removes the only "fundamental" reason to hang on with >fortran. There's no standard for calling sequences from C to FORTRAN, especially for CHARACTER arguments. Our code has to run under VAX/VMS, IBM VM/CMS, Ultrix, Unix, AIX, and so on--so portability is important, and cross language calls are not currently portable. As people have already mentioned, there are optimizations that FORTRAN compilers can make which C compilers cannot (due to things like aliasing of subroutine types, and pointers). In addition, C (last I looked) doesn't guarantee the order of evaluation of expressions--the compiler reserves the right to commute and associate regardless of parentheses and such...so you sometimes have to split expressions up into lots of little pieces to force a particular order of evaluation. This makes C less natural than you might expect for some kinds of numerical calculations. I agree that FORTRAN is an upleasant language to use (especially if you stick to ANSI standard F77 for portability reasons), but there are still valid reasons to use it. -Dan Riley (riley@tcgould.tn.cornell, cornell!batcomputer!riley) -Wilson Lab, Cornell University