From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0d68c502c0ae6 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Printing Enum Variable Re: Linux World Date: 1999/03/05 Message-ID: #1/1 X-Deja-AN: 451601055 Sender: bobduff@world.std.com (Robert A Duff) References: <7bfc2n$jl9@dfw-ixnews5.ix.netcom.com> <7bhh26$r7c$1@remarQ.com> <36DCAC1F.430E2C5E@aasaa.ofe.org> <7bk4v8$kl8$1@remarQ.com> <36DDA761.7B4E8099@aasaa.ofe.org> <7bkrmm$ao1$1@nnrp1.dejanews.com> <36DE0007.5236CEA2@aasaa.ofe.org> <7bmmu2$n0h@news1.newsguy.com> <7bmu66$2eqc@news3.newsguy.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-03-05T00:00:00+00:00 List-Id: Samuel Mize writes: > There's another point about C-style "enum"s not being a true type. > IIRC, the compiler can't easily handle multiple "enum"s with the same > identifier in them. Is my recollection correct? It seems unfair to blame that on enums specifically. C doesn't have overloading, so of course it doesn't have overloading of enums. Interestingly, C++ has overloading, but not for enums. C++ has a purely bottom-up overloading resolution, whereas Ada has a two-pass, bottom-up/top-down resolution, which allows information from above to resolve enumeration type names (and parameterless functions, &c). Similarly, Ada can use a single syntax for integer literals, because the context can determine what type is desired. - Bob -- Change robert to bob to get my real email address. Sorry.