implicit ubyte casting

Stewart Gordon smjg_1998 at yahoo.com
Fri Oct 2 17:45:07 PDT 2009


Stewart Gordon wrote:
<snip>
> #include <stdio.h>
> 
> int main() {
>     unsigned char z = 5;
>     int x = -z; // x now is 251
<snip>

Needless to say, this comment is a mistake.

Stewart.


More information about the Digitalmars-d-learn mailing list