17 Dec
2003
17 Dec
'03
11:17 p.m.
Robert M. Solovay writes:
Is there a simple way to find out if ones computer is big-endian or not? [Like a simple C program that one can compile and run to settle the question.]
Perhaps I can redeem myself by doing the cypherpunk thing and writing code: int isBigEndian() { int test = 0; char *testP = (char *) &test; *testP = 0xff; return !(test & 0xff); } -- | GOOD TIME FOR MOVIE - GOING ||| Mike McNally <m5@tivoli.com> | | TAKE TWA TO CAIRO. ||| Tivoli Systems, Austin, TX: | | (actual fortune cookie) ||| "Like A Little Bit of Semi-Heaven" |