When I compile the following code, I get the error messages indicated in the comments:
#define c 3830 // 261 Hz
const int speakerOut = 9;
void setup() {
}
void loop() {
}
/*
Produces these messages...
In file included from N:\HyperStudioStacks\Arduino\arduino-0022\hardware\arduino\cores\arduino/WProgram.h:13,
from testbug1.cpp:5:
N:\HyperStudioStacks\Arduino\arduino-0022\hardware\arduino\cores\arduino/WCharacter.h:26: error: expected ',' or '...' before numeric constant
N:\HyperStudioStacks\Arduino\arduino-0022\hardware\arduino\cores\arduino/WCharacter.h:27: error: expected ',' or '...' before numeric constant
*/
This minimal souce came from a file that was developed (by someone else) under Arduino-0020. I am using Arduino-0022.
When I add
#include <wprogram.h>
before the define statement, it works as expected. Does anyone have an explaination for why these error messages get produced when Arduino.exe automatically pulls in wprogram.h?