On Wed, Nov 25, 2009 at 12:39 PM, Gerhard Fiedler wrote: > Mark Rages wrote: > >> and instead of an enum I would define a bitmask >> >> #define SUN (1<<0) >> #define MON (1<<1) > > Do you see an advantage to use #defines instead of an enum? > > typedef enum _WEEK_DAYS > { > =A0 =A0SUN =3D (1<<0), > =A0 =A0MON =3D (1<<1), > =A0 =A0... > } WEEK_DAYS; > > In the end not much of a difference, but an enum has the advantage of > not being textual replacement. > It must be a style thing, but I never use enums for bit masks. Regards, Mark markrages@gmail -- = Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist