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

CCS example of WHILE

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








CCS example of WHILE
PostPosted: Mon Feb 08, 2010 5:45 am     Reply with quote

I took this example from the help file, but it fails with " expecting a closed parenthesis"

is it me or CCS ?

while ( !input(PIN_B1) );
Ttelmah
Guest







PostPosted: Mon Feb 08, 2010 7:12 am     Reply with quote

The fault is probably several lines earlier.
One problem with CCS, is that errors that are the result of things like bracket imbalance, only get reported, 'where' the compiler finally decides something is wrong, rather than where the initial counting error starts. So you can find an error like this reported on a line that is actually 'fine', being caused by soething may lines earlier.
The line as posted, compiles fine.

Best Wishes
Guest








PostPosted: Mon Feb 08, 2010 7:49 am     Reply with quote

thanks for the quick reply.

If i comment the line out, it compiles fine.
Ttelmah
Guest







PostPosted: Mon Feb 08, 2010 8:02 am     Reply with quote

Is it possible you have an invalid definition for 'PIN_B1'?. This is just a numeric define and should be in the #include file for the processor. If it was defined wrongly, you could get this error.
What compiler version?.

Best Wishes
Guest








PostPosted: Mon Feb 08, 2010 8:13 am     Reply with quote

its definitely not the pin assignment, i use it elsewhere.


it fails at the same point on V4.074, and V4.093

also tried it on another boot drive (same laptop computer though, just in case its a memory problem).
Guest








PostPosted: Mon Feb 08, 2010 8:21 am     Reply with quote

found it !!!!

I was hacking some other code from a different compiler.

there was an assignment

#define INPUT 1

which of course totally threw the CCS parser

many thanks for you help though.
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