Path: utzoo!attcan!uunet!samsung!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!shlump.nac.dec.com!tkou02.enet.dec.com!diamond From: diamond@tkou02.enet.dec.com (diamond@tkovoa) Newsgroups: comp.lang.c Subject: Re: Re^2: Why does C hate 2d arrays? Message-ID: <1737@tkou02.enet.dec.com> Date: 28 May 90 04:48:03 GMT References: <990@s6.Morgan.COM> <265e1de4-26d.17comp.lang.c-1@vpnet.chi.il.us> <755@ssp11.idca.tds.philips.nl> Reply-To: diamond@tkou02.enet.dec.com (diamond@tkovoa) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 35 In article <755@ssp11.idca.tds.philips.nl> dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) writes: >In article <265e1de4-26d.17comp.lang.c-1@vpnet.chi.il.us> akcs.fish@vpnet.chi.il.us (Gil Winograd) writes: >>Recently I had to write C code to handle a data structure which >>consisted of *variably dimensioned* AND *variable size per dimension* >>arrays. Of course, it was implemented as a one-dimensional array, >>through which I had to go through involved calculations to get the >>index right >>Does Algol/Pascal handle this situation any better? > >No, the number of dimensions is fixed in Algol6{0,8}/Pascal. >APL & APL2 are the only languages I know of which allow changing the >number of dimensions of an array at run-time. >Maybe we should continue this non-C discussion in comp.misc ? Mr. Grunbauer's excerpt of Mr. Winograd's posting (which I did not edit any further) has 5 lines about C and one line about non-C. The two postings together have 5 lines about C, 4 lines about non-C, and one line asking a question. I'd say the answer is no, that a posting which is half about C, and compares C to other languages, somewhat suits the comp.lang.c newsgroup. I also just observed Henry Spencer telling another poster that his question belonged in a hardware-specific newsgroup. The person who posted the question did not know that his problem was machine-dependent. He properly read the manual, tried his best to obey it, and wondered why it didn't work. Correct advice would be to say that in a hardware- specific newsgroup, a useful answer could be obtained more easily. Yes, there's a lot of junk that doesn't belong in comp.lang.c, and like many others, I am also irritated by wading through it. But let's not go overboard and criticize innocents. -- Norman Diamond, Nihon DEC diamond@tkou02.enet.dec.com Proposed group comp.networks.load-reduction: send your "yes" vote to /dev/null.