On Wed, 26 Sep 2001, Hong Zhang wrote:

> There should be no need. ~0xfff is singed int, which will be signed extended
> by compilers as needed. Unless you are using a buggy compiler.

Hehehe.  Ok.  Guess what the following will print:

#include <stdio.h>
int main(void) {
    int x = 511;
    printf("x = %x\n", x);
    printf("x & ~0xff = %x\n", x & (long long) ~0xff);
    return 0;
}


-- 
    Andy Dougherty              [EMAIL PROTECTED]
    Dept. of Physics
    Lafayette College, Easton PA 18042



Reply via email to