S
Steffen Loringer
Hi,
I'm using the following function to join 2 char (byte) into one short on
a 32 bit X86 platform:
unsigned short joinUnsigShort(unsigned char a,unsigned char b)
{
unsigned short val = 0;
val = a;
val <<= 8;
val |= b;
return val;
}
Will this also work if compiled on a PowerPC? Are there better ways to
do it?
Thanks a lot!
Steve
I'm using the following function to join 2 char (byte) into one short on
a 32 bit X86 platform:
unsigned short joinUnsigShort(unsigned char a,unsigned char b)
{
unsigned short val = 0;
val = a;
val <<= 8;
val |= b;
return val;
}
Will this also work if compiled on a PowerPC? Are there better ways to
do it?
Thanks a lot!
Steve