RE: at2 swap_nibbles
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
I see, ok. I'll fix, thanks. -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. Fingle's laws for existentialists - 10.If everything seems to be going well, you have obviously overlooked something. > -----Original Message----- > From: Richard Braakman [mailto:[email protected]] > Sent: Monday, November 25, 2002 6:16 PM > To: [email protected] > Subject: Re: at2 swap_nibbles > > > On Mon, Nov 25, 2002 at 05:46:51PM +0200, Oded Arbel wrote: > > i don't think its related to anything. > > the char type is a byte sized data storage, and the > signed/unsigned behaviour is only important when casting to > different types. > > It matters because of this: > > return ( ( byte & 15 ) * 10 ) + ( byte >> 4 ); > > The >> operator is allowed to sign-extend its operand, so that -16 > (0xf0h) becomes -1 (0xffh). It won't do this if chars are unsigned, > in which case 0xf0h just becomes 0x0fh. > > Richard Braakman > > ______________________________________________________ Scanned and protected by Inflex and McAfee AntiVirus