enums
    mark at cbosgd.UUCP 
    mark at cbosgd.UUCP
       
    Wed Jul  6 13:08:08 AEST 1983
    
    
  
The real reason people don't use enums in C much is that PCC is
too restrictive with them.  The main problem is that you can't ++
or -- them, making for loops iterating over them impossible.
You also can't do < or > comparisons on enums.
For example, if SIG* were made an enum, there would be no way
to catch all signals.  If E* (errnos) were made enums, there
would be no way to check errno for a legal value.  There is
no way to have an array whose subscript is an enum, making it
impossible to have an array of strings for perror, or an array
of old values for signals.
    
    
More information about the Comp.lang.c
mailing list