From: "Christopher Nelson" To: Subject: Re: it's amazing (at least for me) Date: Sat, 10 Jul 1999 13:13:44 -0600 Message-ID: <01becb08$546da000$LocalHost@thendren> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Reply-To: djgpp AT delorie DOT com -----Original Message----- From: aperes Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com Date: Saturday, July 10, 1999 2:55 AM Subject: it's amazing (at least for me) >In this little C program if i change the type of variable k (in setup >function) to byte the program don't work. Can anyone explain me why? because a byte is 8 bits. 128 64 32 16 8 4 2 1 add them all up and you get 255. therefore, your loop in setup will never, ever be false: any value in a byte is ALWAYS <256. the value wraps around at 255 and becomes 1 again. therefore, you get an infinite loop. -={C}=-