delorie.com/archives/browse.cgi | search |
Message-ID: | <3CE8B6F5.4337A883@acm.org> |
From: | Eric Sosman <esosman AT acm DOT org> |
X-Mailer: | Mozilla 4.72 [en] (Win95; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: enum |
References: | <20020520050514 DOT 50800 DOT qmail AT web11302 DOT mail DOT yahoo DOT com> |
Lines: | 25 |
Date: | Mon, 20 May 2002 13:41:48 GMT |
NNTP-Posting-Host: | 12.91.2.15 |
X-Complaints-To: | abuse AT worldnet DOT att DOT net |
X-Trace: | bgtnsc04-news.ops.worldnet.att.net 1021902108 12.91.2.15 (Mon, 20 May 2002 13:41:48 GMT) |
NNTP-Posting-Date: | Mon, 20 May 2002 13:41:48 GMT |
Organization: | AT&T Worldnet |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Pedro Izecksohn wrote: > > Wouldn't be great if it was possible to compile the code > bellow ? I know the compiler's problem with it, but what is > the logical problem ? Hasn't English some words that they > have differents meanings in different phrases ? > > #define something enum something > something { > a,b,c,d,e }; > > #define otherthing enum otherthing > otherthing { > a,s,d,f,g }; > [...] If this were permitted, what output should `printf ("d = %d\n", d);' produce? `d' means 3 in the "something" context, but 2 if regarded as an "otherthing;" which context is correct for the printf() call? -- Eric Sosman esosman AT acm DOT org
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |