Structure property bug?

Todd toddtitus at mindspring.com
Thu Oct 4 14:11:40 PDT 2007


Steven Schveighoffer Wrote:

> "Steven Schveighoffer" wrote
> >  if(ArincData[i].Data &0xff == 203)
> 
> I just realized also that assuming D has the same operator precedence as 
> C/C++, this really evalulates as:
> 
> if(ArincData[i].Data & (0xff == 203))
> 
> Which will obviously be compiled out.
> 
> So what you really want is:
> 
> if((ArincData[i].Data & 0xff) == 203)
> 
> BTW, I looked through the entire spec, and cannot find operator precedence 
> anywhere.  Anyone know where it is?
> 
> -Steve 
> 
> 
Thanks Steve
That works perfect, funny how everything gets blurry at the end of the day.

Todd





More information about the Digitalmars-d mailing list