Message-ID: <3528BF8F.AC9C47A5@cornell.edu> Date: Mon, 06 Apr 1998 07:42:07 -0400 From: "A. Sinan Unur" Organization: Cornell University (http://www.cornell.edu/) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: For loop problem Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk > Miguel Murillo wrote: > > > > 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. Miguel, you should always attribute the quotes to the proper poster. in this case, i think it was Erik Max Francis who made the comment above. > > > unsigned char index = 0; > > unsigned char array[256]; > > for (index = 0; index <= 255; index++) > > array[index] = index; > > > > It's very well. no, it ain't very well. can you spell INFINITE LOOP??? ---------------------------------------------------------------------- A. Sinan Unur Department of Policy Analysis and Management, College of Human Ecology, Cornell University, Ithaca, NY 14853, USA mailto:sinan DOT unur AT cornell DOT edu http://www.people.cornell.edu/pages/asu1/