Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site cbosgd.UUCP Path: utzoo!linus!genrad!mit-eddie!mit-vax!eagle!mhuxt!mhuxi!mhuxa!houxm!ihnp4!cbosgd!mark From: mark@cbosgd.UUCP Newsgroups: net.lang.c Subject: Re: enums Message-ID: <108@cbosgd.UUCP> Date: Tue, 5-Jul-83 23:08:08 EDT Article-I.D.: cbosgd.108 Posted: Tue Jul 5 23:08:08 1983 Date-Received: Thu, 7-Jul-83 12:20:05 EDT References: <754@rlgvax.UUCP>, <755@rlgvax.UUCP> Organization: Bell Labs, Columbus Lines: 10 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.