How did you view the value of result?  If you used StrPrintF, did you use %ld in the 
format string?  Just using %d will give you the 16-bit value.

-----Original Message-----
From:  desa
Date:  2/10/04 1:27 pm
To:  Palm Developer Forum
Subj:  Re: endian formats with fixed point math

It still doesn't work.  I even tried this.
Int32 number = 300;
Int32 shift = 10;
Int32 result = number << shift;

result is equal to -2048, which is the same incorrect answer as before.

I should have mentioned that I'm using PRC-Tools.  Is this an issue with the
compiler?  Did you actually test this out in Codewarrior?

Thanks for your help!



"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Because you didn't write 300L << 10.  300 by itself is a 16-bit integer.



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to