delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/20/03:32:54

Date: Mon, 20 May 2002 10:21:30 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Pedro Izecksohn <izecksohn AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: enum
In-Reply-To: <20020520050514.50800.qmail@web11302.mail.yahoo.com>
Message-ID: <Pine.SUN.3.91.1020520102012.25044A@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 19 May 2002, 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 };

AFAIK, the C Standard rules that all the enumeration constants in the 
same file share the same namespace.  So the Standard disallows what you 
want to do.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019