Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site sdcrdcf.UUCP
Path: utzoo!linus!philabs!sdcsvax!sdcrdcf!jonab
From: jonab@sdcrdcf.UUCP
Newsgroups: net.lang.c
Subject: Re: enums
Message-ID: <375@sdcrdcf.UUCP>
Date: Wed, 6-Jul-83 13:02:42 EDT
Article-I.D.: sdcrdcf.375
Posted: Wed Jul  6 13:02:42 1983
Date-Received: Thu, 7-Jul-83 22:19:54 EDT
References: <754@rlgvax.UUCP>
Reply-To: jonab@sdcrdcf.UUCP (Jonathan Biggar)
Organization: System Development Corporation, Santa Monica
Lines: 20

enums would be much better if you were allowed to use the "++" and
"--" operators on them to implement the pascal pred and succ functions.
Also, you cannot use them in array subscripts.
I would like to be able to write:

enum color {red, white, blue};
enum color hue;
int palate[color];

	hue = red;
	do {
	    if (palate[hue]) {
		/* some code */
	    }
	    if (hue != blue)
		hue++;
	} while (hue != blue);

As they stand, they are not overly useful without a lot of ugly type
conversion.