Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-tis!lll-winken!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical anal Message-ID: <447@quintus.UUCP> Date: 20 Sep 88 07:34:43 GMT References: <1530@ficc.uu.net> <3746@lanl.gov> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 23 In article <3746@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >No, I still like the Fortran 8x stuff better: > ALLOCATABLE, CHARACTER::TWODARRAY(:,:) > ... > ALLOCATE (TWODARRAY(10,10)) > ... > TWODARRAY(5,9) = 'c' >You are a died-in-the-wool C type and I suppose I could never convince >you that arrays and pointers are two separate and distinct concepts that >should each be used only when appropriate. There is something here I don't understand. I am not a DYED-in-the-wool C type, so it is easy to convince me that arrays and pointers are two separate and distinct concepts. What I don't understand is why Giles affirms this in one breath, and then in the next applauds a notation which confuses the two. If I declare a local array, I get an array, there and then. But that rather appalling declaration (this is _Fortran_?) gives me a name which _looks_ like an array, but doesn't act like one: if I try to use it before executing the allocate statement I'll end up with an undefined reference (and that's a property of _pointers_), and the allocate statement is _only_ applicable to pointers, not to ordinary arrays. The name TWODARRAY is used in *some* contexts to refer to the pointer variable (allocate and free) and in *other* contexts to refer to the thing pointed to. "separate and distinct"?