Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-spam!mordor!styx!twg-ap!amdahl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP Newsgroups: comp.lang.c Subject: Re: Auto variable with sizeof == 0 Message-ID: <644@mcgill-vision.UUCP> Date: Wed, 11-Feb-87 01:36:04 EST Article-I.D.: mcgill-v.644 Posted: Wed Feb 11 01:36:04 1987 Date-Received: Fri, 13-Feb-87 06:23:55 EST References: <4114@brl-adm.ARPA> <5258@mimsy.UUCP> <409@mipos3.UUCP> Organization: McGill University, Montreal Lines: 32 In article <409@mipos3.UUCP>, pinkas@mipos3.UUCP (Israel Pinkas) writes: > In article <5258@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >> In article <4114@brl-adm.ARPA> escott%deis.uci.edu@icsg.uci.edu (Scott Menter) writes: >>> ... is there any reason why you should be able to declare an array >>> with zero elements as an automatic variable? Uniformity. Note that this, ie [0], is not the same as []. >> Why not? [...] no members of that array are accessible: Valid >> subscripts are in the range [0..0). It doesn't even occupy any storage (at least it does, zero bytes of it), so sure, why not? > Wrong. There are no valid subscripts to the array. That is what Chris meant (I'm sure). Mathematicians use square brackets to denote a closed interval end and parentheses to denote an open end, so that [1..10) would indicate those x for which 1<=x<10. This is arguably inconsistent when both ends are the same value, but I, at least, found his meaning perfectly clear anyway. (Generally, if you disagree with Chris about a point of fact (as opposed to opinion), check your beliefs, assumptions, and understanding of his posting very carefully; he's usually right.) der Mouse USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse think!mosart!mcgill-vision!mouse Europe: mcvax!decvax!utcsri!mcgill-vision!mouse ARPAnet: think!mosart!mcgill-vision!mouse@harvard.harvard.edu