From: Roland Exler Newsgroups: comp.os.msdos.djgpp Subject: Re: Laugh at my mistakes (Errors you wish you're mother told you about) Date: Tue, 22 Oct 1996 08:16:15 -0700 Organization: Institute for el. Measurement, University of Linz, Austria Lines: 28 Message-ID: <326CE53F.7D83@jk.uni-linz.ac.at> References: <54fgop$eoe AT whitbeck DOT ncl DOT ac DOT uk> NNTP-Posting-Host: sensor4.emt.uni-linz.ac.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Chris A. Triebel wrote: > > 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. If I remember right, gcc puts a warning at this statements if compiled with -Wall! Roland +---------------------------------------+---------------------------+ I Roland Exler I EMAIL: I I Universitaet Linz I R DOT Exler AT jk DOT uni-linz DOT ac DOT at I I Institut fuer Elektrische Messtechnik I I I Altenbergerstr. 69 I Phone: I I A-4040 Linz, AUSTRIA I + 43 732 2468 9205 I +---------------------------------------+---------------------------+