Path: utzoo!attcan!uunet!pyrdc!pyrnj!rutgers!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical analysis Message-ID: <3630@lanl.gov> Date: 15 Sep 88 17:17:47 GMT References: <13567@mimsy.UUCP> Organization: Los Alamos National Laboratory Lines: 23 From article <13567@mimsy.UUCP>, by chris@mimsy.UUCP (Chris Torek): > > You have just described C declarations. No, I didn't. I said that the declaration for an array should look (and mean) something different than the declaration of a pointer. In C, there are indeed two different syntaxes - they just both mean the _same_ thing. I can't declare an array in C without getting one or more pointers declared into the bargain. I want a language that gives _me_ the choice. C doesn't do it! Most of the pointer proposals for Fortran do! C _can't_ do it without making changes which aren't backward compatible. _All_ the Fortran pointer proposals I've seen _are_ backward compatible. (The Cray Fortran compiler has had pointers for years. Everything you can do with C pointers you can do with Fortran pointers. Arrays can be dynamically allocated - but the declaration and use of the arrays are identical with statically allocated arrays except for the additional POINTER statement. In C, the declaration of a dynamically allocated (multi-D) array is completely different from the declaration for a statically allocated one - the use is different too if you follow most implementation proposals.) J. Giles Los Alamos