Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!sun-barr!newstop!sun!amdcad!dgcad!dg-rtp!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: Re: Global and Extern Pointers, Arrays Summary: not a good model Message-ID: <1984@sheol.UUCP> Date: 27 May 91 01:53:29 GMT References: <3153@cirrusl.UUCP> Lines: 20 > dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) > [...] char *A and char B[NUM]. [...] > However, B is not a pointer. It's just treated like one sometimes. It > is a SYMBOLIC NAME FOR AN ADDRESS. This is a bad model for thinking about pointers and arrays, because it makes things like sizeof anomalous in the model. It also uses words in ways incompatible with the way they are used in the standard, thus perpetuating confusion. Why not approach it as the orthodox do? A is a pointer, B is an array. Arrays are converted to pointer values when used in expressions where a value is required, which leads the heterodox to falsely claim that "arrays and pointers are the same thing in C". What's so complicated about this that it need come up so often? -- Wayne Throop ...!mcnc!dg-rtp!sheol!throopw