Thanks Mark, that looks like it will do exactly what I am after. Cheers Justin 2009/11/25 Mark Rages > On Tue, Nov 24, 2009 at 11:26 PM, Justin Richards > wrote: > > I am sure I should be able to do something like > > > > if (days.day[tm_wday]) > > { > > do something > > } > > > > Is this possible? > > > > I don't know how c18 packs those bits, but I'd do this: > > if (days.val & ( 1< do something > } > > and instead of an enum I would define a bitmask > > #define SUN (1<<0) > #define MON (1<<1) > > etc. > > 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 > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist