Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Arrays and pointers Message-ID: <463@quintus.UUCP> Date: 23 Sep 88 01:18:10 GMT References: <1030@amelia.nas.nasa.gov> <3968@lanl.gov> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 19 In article <3968@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >That is - _NEARLY_NEVER_!! A pointer is a way of placing the structural >template defined by a data type over an arbitrary memory location. > ^ >PERIOD!! That's all a pointer is for. That's a very strange way of thinking about pointers. It is possible to have pointers without having pointer arithmetic and without having any way of obtaining the address of an existing location. For example, in one of my favourite languages, I would write REF [,] REAL two d array = HEAP [1:m,1:n] REAL; which allocates a new m x n array and binds the reference two d array to it. [Thanks to "dereferencing", the fact that two d array is a reference can be ignored in the code that uses it. This is not an unqualified good.] A pointer is the way of referring to a dynamically allocated object, ... ^ COMMA!! A pointer is for lots of other things too. But "placing a structural template" sounds more like EQUIVALENCE (:-)...