Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!metaphor!lizard.metaphor.com!barry From: barry@lizard.metaphor.com (Barry Friedman) Newsgroups: comp.lang.c Subject: typedef enum as subset of another enum Keywords: typedef, enum Message-ID: <1256@metaphor.Metaphor.COM> Date: 28 Jun 90 22:22:25 GMT Sender: news@metaphor.Metaphor.COM Reply-To: barry@lizard.metaphor.com (Barry Friedman) Distribution: na Organization: Metaphor Computer Systems, Mountain View, CA Lines: 14 Excuse me if I am being an ignoramus but... I want to create two enumerated types, one being a subset of the other, something like this: typedef enum { a, b, c, d, e } Set; /* This defines the full set */ typedef enum { b, c, d } SubSet; /* This is a subset of above */ I wasn't too surprised when my compiler choked on this. Is there a way to do this in C? I have checked a few books and I haven't seen anything that hints at a way to do it. Thanks in advance. ======================================================================== Barry_Friedman(); /* "Why stop now, just when I'm hating it?" - Marvin the Paranoid Android */