thx
but what should I do to change type?
UInt16 intVal_16;
UInt32 intVal_32;
intVal_16 = 60000;
intVal_32 = intVal_16;
abort_int("%u", intVal_32); //the value is not correct
"Markus Dresch" <[EMAIL PROTECTED]> �b�l�� news:[EMAIL PROTECTED] �����g
...
> 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/