Grouse: What's the point of enum?
Chris Torek
torek at elf.ee.lbl.gov
Fri Apr 19 04:45:16 AEST 1991
>>[enumerated types are ridiculously weak; why do they exist at all?]
In article <1991Apr18.153418.13527 at zoo.toronto.edu> henry at zoo.toronto.edu
(Henry Spencer) writes:
>Just ignoring them is the simplest thing to do.
It is sometimes nice to have a symbolic debugger print
state = TCPSTATE_ESTABLISHED
or whatever, and it is sometimes nice to allow the compiler to choose
the types and values of enumeration variables and constants. A few
compilers will also warn about `mixed up' enumerations (enum apple
with enum orange). That makes three tiny points in favour :-)
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.lang.c
mailing list