Not necessarily. It's up to the compiler to use the type it deems
appropriate. Use the sizeof() operator to figure out the actual bit width.

Janos


On Fri, Jul 31, 2009 at 4:05 PM, Philip Levis <[email protected]> wrote:

> An enum type has the same bit width as an integer (int).
>
> Phil
>
> On Jul 30, 2009, at 7:45 AM, Rémi Villé wrote:
>
> > Hi,
> >
> > I try to exactly know the size of messages I use in a distributed
> > application. One parameter in this message is an enum type and I
> > don't know if it will be a 8,16 or 32 bit integer on a mote.
> > Is there a way to know the size of an enum variable? I use enum
> > because it's practical, but maybe I shouldn't use it in a network
> > message.
> >
> > Regards,
> >
> > Rémi
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to