A prime example of what I termed "pencilheaded programming errors" in my previous post. My favorite compiler defaults to unsigned char, but others probably do something different. Some others might assume the number 10 means 0x10 AFAIK. -- Lawrence Lile piclist@XARGS.COM Sent by: pic microcontroller discussion list 10/27/2003 01:56 PM Please respond to pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: [PIC]:weird jump of program to other program memory location On Mon, 27 Oct 2003 llile@SALTONUSA.COM wrote: > char i; > i= 9; > do{ > some stuff > }while(--i < 9 ); > > will define behavior for every possible value of i. I think you meant "unsigned char i"? The code above runs the loop 138 times when "char" is signed. -- John W. Temples, III -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body