delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/22/08:26:35

From: "Chris A. Triebel" <cat AT sun4 DOT iol DOT unh DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Laugh at my mistakes (Errors you wish you're mother told you about)
Date: Mon, 21 Oct 1996 12:26:13 -0400
Organization: University of New Hampshire - Durham, NH
Lines: 18
Message-ID: <Pine.SUN.3.91.961021122321.28339B-100000@sun4.iol.unh.edu>
References: <54fgop$eoe AT whitbeck DOT ncl DOT ac DOT uk>
NNTP-Posting-Host: sun4.iol.unh.edu
Mime-Version: 1.0
In-Reply-To: <54fgop$eoe@whitbeck.ncl.ac.uk>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

while(i=0)	// never enters the loop
{
	...
}

int j=SOME_NUMBER_NOT_ZERO;
while(i=j)		// perpetual look where i never really changes
{
	i++;
	...
}

Very common for me using a compiler that doesn't throw a warning about 
setting value where it suspects a comparator should be.

cat
:)

- Raw text -


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