Message-ID: <36B1EDB5.53C1FDCB@net4you.co.at> Date: Fri, 29 Jan 1999 18:19:49 +0100 From: Seawolf X-Mailer: Mozilla 4.07 [de] (Win98; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Bitshifting Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.177.154.92 X-Trace: 29 Jan 1999 18:19:08 +0100, 194.177.154.92 Lines: 11 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Why does this code work with DJGPP but not with Borland C 3? int value = 0x000F; unsigned long c; c = value + (value<<8) + (value<<16) + (value<<24); DJGPP produces the correct 0x0F0F0F0F. But Borland C 3.1 only does the last two bytes: 0x00000F0F