Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Arrays and pointers Message-ID: <3968@lanl.gov> Date: 21 Sep 88 20:40:42 GMT References: <1030@amelia.nas.nasa.gov> Organization: Los Alamos National Laboratory Lines: 22 From article <1030@amelia.nas.nasa.gov>, by fouts@lemming.nas.nasa.gov.nas.nasa.gov (Marty Fouts): > [...] Now add to it the > notational convenience of using pointers when they make the code > clearer to read then array references. [...] 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. If I don't need that functionality, I also don't want any pointers! You're right in your argument: the purpose of a programming language is to provide convenient and readable access to the functionality of the machine. You're wrong in your conclusion: pointers (especially the C syntax) usually obscure the meaning of the code because they are used to implement functionality that's inappropriate to them. By the way, the use of pointers in the above way _is_ sometimes useful and should be provided in the language. But it shouldn't be used to implement other things for which it is _not_ appropriate. J. Giles Los Alamos