I'm having a very weird issue with #define
in my app, I wanted to reduce the memory usage, and so I wrote this
#define CALIB1 0
quite easy, right?
it should just convert CALIB1 to 0 on compile time.
why do I get this, then?
In function 'void loop()':
error: expected `)' before ';' token
if I use
then no problem at all.
is this a bug in the IDE?
it's making me nuts.
thank you for helping.
what version of the Arduino software are you using? It compiles fine for me in Arduino 006/MacOSX/Intel.
Binary sketch size: 4242 bytes (of a 7168 byte maximum)
sorted that out.
in typing the code back in the forum post I typed it correctly.
the mistake was adding a semi-colon at the end of the define line.
this was causing the pre-compiler to create
I should have realized that earlier reading the output message.
works for me too, of course.
thank you for the interest.