On Fri, Apr 01, 2011 at 09:34:20AM +0100, andy pugh wrote: > On 1 April 2011 06:02, Pavel Shramov <shra...@mexmat.net> wrote: > > > u32_var = ((u32) (u16) s16_var); > > > > u16 casts s16 to 16 bit positive number. > > So, (s16)-10 == 32778? (s16) -10 == -10 (u16) -10 == 0xfff6
You may check it with shell: $ printf '%x\n' -10 fffffffffffffff6 Pavel ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers