Go Down

Topic: Possible error in the en/Reference/Return entry--first Example (Read 362 times) previous topic - next topic

kriskim

I think there is a minor error in the Examples section of the reference entry for the return keyword. The first example has the following code snippet:

int checkSensor(){       
    if (analogRead(0) > 400) {
        return 1;
    else{
        return 0;
    }
}

There should be a '}' after the "return 1;" statement.

Go Up