implicit ubyte casting

Saaa empty at needmail.com
Thu Oct 1 10:24:38 PDT 2009


Moritz Warning wrote
>
> This is a troublesome behavior:
>
> ubyte z = 5;
> int x = -z; // x now is 251
> int y = -1 * z; // y is now -5

Yes, troublesome is the correct word :)
Does anybody ever use the =-z behaviour? 




More information about the Digitalmars-d-learn mailing list