enums
jmc at root44.UUCP
jmc at root44.UUCP
Thu Jul 7 15:29:38 AEST 1983
I think enums are a nice concept, as I always believe in making the computer
do the work for me, and thinking of numbers is something it can do better.
Where they do break down in C (in my view) is that there is no syntax for
initialising an array with enum indices. Thus you cannot simply replace
error.h numbers for example, and still have sys_errlist[] defined in the
same way. Most of my attempts to use enums have foundered on this particular
rock and I have ended up with defines, not wanting to write lots of code
for what the C compiler ought to be doing.
John Collins
Root Computers Ltd
...!vax135!ukc!root44!jmc
More information about the Comp.lang.c
mailing list