Can anyone tell me why this, from an example, compiles:
#include "pitches.h"
// notes in the melody:
int melody[] = {
NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4};
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 8, 8, 4,4,4,4,4 };
void setup() {
...
yet this from a sketch which used to work under an earlier version of Arduino IDE, but not under 1.0.3 thinks that the array declarations are functions, with the error message: "function definition does not declare parameters":
#include "pitches.h"
int laCucaracha[] {
NOTE_C5, NOTE_D5, NOTE_C5, NOTE_F5, NOTE_A5,
NOTE_C5, NOTE_D5, NOTE_C5, NOTE_F5, NOTE_A5,
0,
NOTE_F5, NOTE_F5, NOTE_E5, NOTE_E5, NOTE_D5, NOTE_D5, NOTE_C5,
0,
NOTE_C5, NOTE_D5, NOTE_C5, NOTE_E5, NOTE_G5,
NOTE_C5, NOTE_D5, NOTE_C5, NOTE_E5, NOTE_G5,
0,
NOTE_C6, NOTE_D6, NOTE_C6, NOTE_AS5, NOTE_A5, NOTE_G5, NOTE_F5
};
int noteDuration[] {
8, 8, 8, 2, 3,
8, 8, 8, 2, 3,
8,
8, 8, 8, 8, 8, 8, 4,
2,
8, 8, 8, 2, 3,
8, 8, 8, 2, 3,
8,
8, 8, 8, 8, 8, 8, 4
};
const int led = 13;
const int speaker = 8;
void setup() {
....