Date: Mon, 6 Apr 1998 09:48:46 +0200 (MET DST) From: Miguel Murillo To: Erik Max Francis cc: djgpp AT delorie DOT com Subject: Re: For loop problem In-Reply-To: <35280CBF.FA7634A@alcyone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk > > 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. Yes, It's well > > int index; > > for (index = 0; index < 256; index++) > ... unsigned char index = 0; unsigned char array[256]; for (index = 0; index <= 255; index++) array[index] = index; It's very well. Miguel Murillo