Can't add ubytes together to make a ubyte... bug or feature?

Ali Çehreli acehreli at yahoo.com
Sat Mar 17 21:00:05 UTC 2018


On 03/17/2018 11:36 AM, Jonathan wrote:

> `(a+b)&0xff` What is this syntax?!  Could you give a link to this in the 
> D documentation?

Here is my description of bitwise AND:

 
http://ddili.org/ders/d.en/bit_operations.html#ix_bit_operations.&,%20bitwise%20and

The section titled "Masking" on the same page explains what &0xff part 
means.

> I am not even sure how to look it up...

I hope my index section is useful in such cases. Just search for the & 
character there:

   http://ddili.org/ders/d.en/ix.html

Yes, there are many meanings of the & character but I think it's still 
useful. :)

Ali


More information about the Digitalmars-d-learn mailing list