Path: utzoo!mnetor!uunet!mcvax!enea!kuling!martin From: martin@kuling.UUCP (Erik Martin) Newsgroups: comp.lang.c Subject: Re: { initializer-list , } Message-ID: <680@kuling.UUCP> Date: 16 Mar 88 15:08:21 GMT References: <660@kuling.UUCP> <25526@cca.CCA.COM> Reply-To: martin@kuling.UUCP (Per-Erik Martin) Organization: Dept. of Computer Systems, Uppsala University, Sweden Lines: 17 In article <25526@cca.CCA.COM> g-rh@CCA.CCA.COM.UUCP (Richard Harter) writes: >[...] Again, suppose that your table of initializers is machine >generated; the generator code will be simpler if the last item is not a >special case. Indeed, if you think about it, the specification is simpler >if the comma is a terminator rather than a separator because all items in >the specification list have the same format, instead of the last one having >a special format. Then, why isn't an 'optional' comma allowed after the last constant in an enumeration list? I bumbed into this fact when I needed to generate both an initialized array and an enumeration declaration from a file of symbols, and found that I had to give special treatment to the last item in the enumeration. *Very* frustrating. -- ((Per-Erik Martin, Computing Science Dept., Uppsala University, ) (Box 520, S-751 20 Uppsala, Sweden ) (UUCP: martin@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!martin)))