you are sending msg "%d". %d or %i are signed integers. use %u for unsigned
integers.

markus dresch (www.palmside.com)


"KEN" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> well I thought UInt16 should be ranged from 0 to 65535, but when I use CW
to
> test, it seems not the case. It seems that UInt16 is equal to Int16 which
> is -32767 to 32767, why?
>
> I use the following codes to test
>
> #define abort_int(msg, int) { \
> char outStr2[128]; \
> StrPrintF(outStr2, msg, int); \
> ErrDisplayFileLineMsg(__FILE__, __LINE__,outStr2); \
> }
>
> UInt16  intVal;
>
> intVal = 60000;
> abort_int("%d", intVal);    // the value shown is -5536 which is wrong
>
>
>



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

Reply via email to