www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/29/12:39:06

Message-ID: <36B1EDB5.53C1FDCB@net4you.co.at>
Date: Fri, 29 Jan 1999 18:19:49 +0100
From: Seawolf <seawolf AT net4you DOT co DOT at>
X-Mailer: Mozilla 4.07 [de] (Win98; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bitshifting
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019