On Mon, Aug 17, 2009 at 02:17:17PM +0200, Thomas Pfaff wrote:
> [...]
> > > However, my question was not why not use the macro but why
> > > specify 0x1 rather than just 1.
> > >
> > > AFAIK there's no difference but the /* XXX magic 0x1 */ comment
> > > seem to indicate otherwise and it got me curious, though no big
> > > deal.
> > 
> > There is no diffrence. However sometimes I use 0x01 to say 'the bit 0
> > set' (for example in context of flags) and use decimal numers only for
> > numbers.
> > 
> > maybe the auther in this case want to say the same thing.
> 
> Seems a bit overkill to mark personal preference with XXX magic, but
> alright.  I'll go with that explanation ;-)
> 

The magic is for the value 1 (it does not matter if written 1 or 0x1) it
seems that for some magic reason that bit needs to be set or the world
stops spinning or something similar.

Using hex notation for bitfields is more or less the standart as it is
easier to convert then decimals.

-- 
:wq Claudio

Reply via email to