bitwise operation and type

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Nov 20 23:32:55 PST 2013


On 11/20/2013 11:21 PM, bioinfornatics wrote:
> why this fail http://www.dpaste.dzfl.pl/a6d6acf4

as with c, most of the integer operators return int for integral types 
smaller than int. also, this is a case where

a += b

does something different than

a = a + b

i guess the former automatically inserts a cast or something.

>
> I want to works with ubyte -> 0000 0000
> i do not want use int for manipulating these byte and consume more
> memory as need!

tough. use a cast.


More information about the Digitalmars-d-learn mailing list