View previous topic :: View next topic |
Author |
Message |
chironex
Joined: 01 Jul 2011 Posts: 3
|
Seemingly incorrect "Unexpected Identifier" error |
Posted: Fri Jul 01, 2011 8:30 pm |
|
|
Hello, new here.
The following code is giving me an unexpected identifier error:
Code: |
#INT_DAC1R
void dacRightInterrupt() {
signed int16 sample; // I declare sample right fracking here!
int16 bufPop(int1); // Function defined elsewhere in this file
sample = bufPop(R); // Error: Unexpected identifier sample
if(sample == ERRORINT16) {
throwError();
} else {
dacR(sample);
}
}
|
Can someone help me fix this? I am using PCD 4.120.
I can't see why this would matter, but I am not using a *.h file.
Thanks. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Fri Jul 01, 2011 8:40 pm |
|
|
This line is causing your problems.
int16 bufPop(int1); // Function defined elsewhere in this file _________________ Google and Forum Search are some of your best tools!!!! |
|
|
chironex
Joined: 01 Jul 2011 Posts: 3
|
|
Posted: Fri Jul 01, 2011 9:10 pm |
|
|
But, when I get rid of it, I get a different error:
Code: |
#INT_DAC1R
void dacRightInterrupt() {
signed int16 sample;
sample = bufPop(R); //Error: A numeric expression must appear here
if(sample == ERRORINT16) {
throwAShitstorm();
} else {
dacR(sample);
}
}
|
I added that line because it prevented the above error from occurring. (Of course, creating a different error.) |
|
|
chironex
Joined: 01 Jul 2011 Posts: 3
|
|
Posted: Fri Jul 01, 2011 9:19 pm |
|
|
Nevermind, solved it. Thanks. |
|
|
|