On 12/03/2011 14:41, rchadwic wrote: > With the statement located at POSITION A, it does the WHILE loop once; to > repeat requires reloading the program. I am expecting the program to repe= at > each time I push RUN; it doesn't. It will stop at the while(1) as Isaac mentioned, and you will need to=20 reset to run again (toggle MCLR or power) This sounds normal. > With the statement located at POSITION B, I get an OUT OF RANGE indicat= ion > on the Watch window. A count of 30 was expected. Repeat requires reloadin= g > the program. Do you mean out of scope? (you say that in the comments) If you are in the while(1) loop then it is likely the variable is out of=20 scope - try a breakpoint just after the variable. > With the statement located at POSITION C, it will not compile and I get a > syntax error that has not responded to typing error checks, research, and > checks of the preceding line of code. You need to declare the variables at the start of a scope block (for=20 C89, which I believe C18 is compatible with) --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .