www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/09/21:17:56

Lines: 20
X-Admin: news AT aol DOT com
From: wcount12 AT aol DOT com (WCount12)
Newsgroups: comp.os.msdos.djgpp
Date: 10 Sep 2001 01:13:15 GMT
Organization: AOL, http://www.aol.co.uk
Subject: Pointers (Differencing)
Message-ID: <20010909211315.28225.00000857@mb-bg.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Im getting some garbage data when differencing two pointers
that point to the same array.  What is confusing me is that
of the 57709 entries in the array, garbage data is in only 728 
records.  The others are correct.  If I step through and locate
one such error, I can see no reason why im getting garbage,
it should return something like 52, instead I get 566884.

Id post the code but its a large program.

Here is what im basically doing.

answer = ptr1 - ptr2 

where ptr1 & ptr2 are pointers to the 
same array.  The array is of the Long data type.

Any suggestions appreciated

Thanks
Paul 

- Raw text -


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