The code is as follows: void delay_1_msec (void) { count = 110; while (count>0) { count--; } } Everything compiles and works when I use this function declaration in Program A. I have a second program, Program B that also works as expected. However, when I cut and paste this code snippet from Program A to Program B (which also worked), Program B refuses to compile (even with the line calling the function commented out). The errors I'm getting are: no identifier in declaration missing basic type; int assumed ";" expected Given that this same code worked in another program, I doubt that this is a syntax error. Yes, I have declared the variable count as an unsigned char. In fact, I have a similar pre-existing function in Program B that caused no problems. The function declaration is: void delay_20_usec(void) { count = 2; while (count>0) { count--; } } What am I overlooking? -- Jason Hsu http://www.jasonhsu.com/swrwatt.html http://www.jasonhsu.com/swrwatt-c.txt http://www.jasonhsu.com/swrwatt-asm.txt -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist