www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/13/12:46:54

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: integer assignment error
Date: Fri, 13 Apr 2001 17:24:10 +0100
Lines: 26
Message-ID: <3AD7282A.D3496DE2@phekda.freeserve.co.uk>
References: <20010413154455 DOT 46911 DOT qmail AT web13302 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: modem-10.meitnerium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg4.svr.pol.co.uk 987179781 26923 62.136.74.138 (13 Apr 2001 16:36:21 GMT)
NNTP-Posting-Date: 13 Apr 2001 16:36:21 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.17 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Rafael Frongillo wrote:
> I have this integer that is assigned 0 when declared,
> and I am ABSOLUTELY POSITIVELY certain that I am not
> assigning it a value over 5 or less than -1. However,
> when running the program, somehow the value reaches
> 734532 or something like that. I also noticed many
> other variables doing the same thing, and frankly,
> it's kind of freaking me out... Please tell me what
> could be happening!

You could be writing a value more than 5 or less than -1. Maybe not
directly, but perhaps through an increment or decrement, if you have a
loop and the loop condition is incorrect.

If you post a sample of the code that doesn't work, maybe someone can
help.

Bye,

-- 
Richard Dawe <richdawe AT bigfoot DOT com> http://www.bigfoot.com/~richdawe/ 

"The soul is the mirror of an indestructible universe."
--- Gottfried W. Leibniz

- Raw text -


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