Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: chronic source of confusion in C Keywords: arrays in C Message-ID: <22550@mimsy.umd.edu> Date: 15 Feb 90 14:38:41 GMT References: <1486@mdbs.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 22 In article <1486@mdbs.UUCP> zed@mdbs.UUCP (Bill Smith) writes: >Why is the ANSI definition of arrays such a chronic source of >confusion? Was it screwed up so bad before that it will take >a lot of work to re-train the masses? > >Is the current definition more sophisisticated than the old >intuitive (?) version? Are the people who teach C unaware of >the subtleties of what an array is? The `current' definition (by which I presume you mean the ANSI C definition) of arrays is, for all intents and purposes, identical to the K&R-1 definition. The only change was the addition of a notion of `incomplete' types, and that an array with unknown size is an incomplete type. As for the lattermost question: I suspect that yes, many people who teach C do not understand how C arrays work---that is, do not understand that C arrays are, at best, second class citizens; that there are no array values, only array objects. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris