View previous topic :: View next topic |
Author |
Message |
Guest
|
preprocessor problem? |
Posted: Sat Nov 29, 2008 8:03 am |
|
|
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
|
|
Posted: Sat Nov 29, 2008 8:26 am |
|
|
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
|
|
Posted: Sat Nov 29, 2008 9:29 am |
|
|
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: 1941 Location: Norman, OK
|
|
Posted: Sat Nov 29, 2008 10:11 am |
|
|
If you show CCS Support the problem they may let you update to the current version instead of having to roll back... |
|
|
|