Mail Archives: djgpp/1998/10/08/18:28:26
On Tue, 6 Oct 1998 jwright AT adtran DOT com wrote:
> a = 12;
> b = 18;
> c = ( a << 16 ) + b;
You probably meant 8, not 16...
> printf("\nCombine 12 and 18 to get %d,\n", c);
> printf(" or in hex 0x%04X\n, c);
... otherwise the hex value won't show `a' at all (it's only 4
digits long).
> This converts two bytes to one integer. Make sure you check endian
> for the CPU you will use.
What has the endianness got to do with anything?
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html
- Raw text -