I have MPLab V8.43 installed and just installed the C18 complier for programming.
Whenever I try and build a small test code it halts at the first variable declaration. It says there is a syntax.
unsigned char counter;
doesn’t look wrong to me…even did it as unsigned char counter[1]; and it still tossed a syntax error back at me.
What gives? Any ideas?
Local variables must be declared at the top of a block (in this case, a function.) This is according to the C89 standard.
These are acceptable:
This is not acceptable: