delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/27/15:41:18

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <20040727194057.67565.qmail@web50701.mail.yahoo.com>
Date: Tue, 27 Jul 2004 12:40:57 -0700 (PDT)
From: Lets Go Canes <letsgonhlcanes AT yahoo DOT com>
Subject: Re: assembly code of the "strange error" - program
To: djgpp AT delorie DOT com
In-Reply-To: <FaxNc.666$zS6.94831@news02.tsnz.net>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hi all.

--- Paul Wilkins <disk AT paradise DOT net DOT nz> wrote:
> DJ Delorie wrote:
> >> >int U[99]; memset(U, 4, sizeof(U));
> >> >memset fills the memory locations used by U with the value 4.
> > 
> > No, it sets it to 0x04040404.
> 
> So long as it's an int array, where is the difference? Is it in my 
> understanding of potential implications?

The difference is that if int is 16 bits, then each element of U has
been set to 0x0404, which is not equal to 0x0004.


=====
--------------
Lets Go Canes!


		
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

- Raw text -


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