Pages: [1]   Go Down
Author Topic: Possible error in the en/Reference/Return entry--first Example  (Read 300 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: