system
1
Here is the link: http://www.arduino.cc/en/Reference/FunctionDeclaration
Here is the compile error: function_2_demo:6: error: function definition does not declare parameters
Here is the code that does not compile:
void setup(){
Serial.begin(9600);
}
void loop{
int i = 2;
int j = 3;
int k;
k = myMultiplyFunction(i, j); // k now contains 6
Serial.println(k);
delay(500);
}
int myMultiplyFunction(int x, int y){
int result;
result = x * y;
return result;
}
Looks like a typro/error in the reference, missing () after loop.
Here is the code that does not compile:
void setup(){
Serial.begin(9600);
}
void loop(){
int i = 2;
int j = 3;
int k;
k = myMultiplyFunction(i, j); // k now contains 6
Serial.println(k);
delay(500);
}
int myMultiplyFunction(int x, int y){
int result;
result = x * y;
return result;
}
system
3
Thanks to Retrolefty
That is indeed correct. Now how do we get the web page corrected?