CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Seemingly incorrect "Unexpected Identifier" error

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
chironex



Joined: 01 Jul 2011
Posts: 3

View user's profile Send private message

Seemingly incorrect "Unexpected Identifier" error
PostPosted: Fri Jul 01, 2011 8:30 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 01, 2011 8:40 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 01, 2011 9:10 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 01, 2011 9:19 pm     Reply with quote

Nevermind, solved it. Thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group