From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: For loop problem Date: Sun, 05 Apr 1998 15:59:11 -0700 Organization: Alcyone Systems Lines: 23 Message-ID: <35280CBF.FA7634A@alcyone.com> References: <3527FEA6 DOT 54FA AT vegas DOT infi DOT net> NNTP-Posting-Host: charmaine.alcyone.com 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 Precedence: bulk Simz wrote: > unsigned char index = 0; > unsigned char array[256]; > for (index = 0; index < 256; index++) > array[index] = index; Iterate with something other than a char. An unsigned char can hold values between 0 and 255 inclusive, so these conditions will _always_ be satisfied. int index; for (index = 0; index < 256; index++) ... -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm:+37.20.07/-121.53.38 \ "I've got the fever for the / flavor of a cracker" / Ice Cube