🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.moderated
Article #54

Re: enum expression is IF statement

#54
From: Hyman Rosen
Date: Sat, 17 Feb 1996 02:58
17 lines
1367 bytes
In article <4g1pj9$pqg@netlab.cs.rpi.edu>
gstern@earth.usa.net (Greg Sternberg/PDS Inc) writes:
>      You're making the assumption that the compiler is numbering your enums
>      sequentially from 0 - since the standard says nothing about how the
>      compiler could number your enums it could very well be using 0x1, 0x2, 
>      0x4, and 0x8.
>
>   { If this is true this is a fairly obscure, important C incompatibility
>     references anyone ? -mod}

No, of course it's not true. See [dcl.enum]. Enumerators start at zero
and go up by one.

      [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
      [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
      [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
      [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]
Technical Details
Message-ID: <4g3g8j$7cl@netlab.cs.rpi.edu>
Path: arc1-ca.pugleaf.net!tmpnews.crd.ge.com!rebecca!rpi!not-for-mail
References: <4fq7dc$pac@netlab.cs.rpi.edu> <4g1pj9$pqg@netlab.cs.rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tmpnews.crd.ge.com!rebecca!rpi!not-for-mail
From: jyacc!hymie@uunet.uu.net (Hyman Rosen)
Newsgroups: comp.lang.c++.moderated,comp.lang.c++
Subject: Re: enum expression is IF statement
Date: 17 Feb 1996 02:58:27 -0000
Organization: JYACC, Inc.
Sender: cppmods@netlab.cs.rpi.edu
Approved: vandevod@cs.rpi.edu
Message-ID: <4g3g8j$7cl@netlab.cs.rpi.edu>
References: <4fq7dc$pac@netlab.cs.rpi.edu> <4g1pj9$pqg@netlab.cs.rpi.edu>
NNTP-Posting-Host: netlab.cs.rpi.edu
X-Original-Date: Sat, 17 Feb 1996 01:41:05 GMT