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 support@ccsinfo.com

preprocessor problem?

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








preprocessor problem?
PostPosted: Sat Nov 29, 2008 8:03 am     Reply with quote

Hm...

Some problem with the preprocessor or what?

Please try, both statement is true, but only the last is in the "lst" file.

This is _just_ a examples not production code:-)

Err. No code fro this?
#define def
#define tp2(bit) #ifdef def output_bit(_led_g,bit); #endif

OK. code is there.
#define tp3(bit) #ifndef notdef output_bit(_led_g,bit); #endif
Ttelmah
Guest







PostPosted: Sat Nov 29, 2008 8:26 am     Reply with quote

You need to say what compiler version.
However both generate code for me, with four different versions.
You need to search for the declared name though. I just defined _led_g to be PIN_B0 (otherwise it was not going to work), then:
tp2(0)

Generated:
.................... tp2(0)
4702: BCF F8A.0

Perfectly sensible.
Exactly the same, on 3.249, 4.059, 4.071, and the latest version

Best Wishes
Guest








PostPosted: Sat Nov 29, 2008 9:29 am     Reply with quote

Thanks for testing.

My ccs is:
4.074 and it does not work.
but with
4.068 is work, I will roll back to this version:-(
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Sat Nov 29, 2008 10:11 am     Reply with quote

If you show CCS Support the problem they may let you update to the current version instead of having to roll back...
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