#define not working [solved. my mistake]

hi, guys.

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


void setup(){

}

void loop(){
   int an1=analogRead(CALIB1);
}

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 int an1=analogRead(0);

then no problem at all.
is this a bug in the IDE?
it's making me nuts.

thank you for helping.

ubi

what version of the Arduino software are you using? It compiles fine for me in Arduino 006/MacOSX/Intel.

Done Compiling

Binary sketch size: 4242 bytes (of a 7168 byte maximum)

hey, daniel.

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

int an1=analogRead(0;);

I should have realized that earlier reading the output message.
works for me too, of course.

thank you for the interest.