Go Down

Topic: Possible error in the en/Reference/Return entry--first Example (Read 373 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy