Skip to content

Error in "return" reference page example code #6562

Closed
arduino/reference-en
#200
@RicardoGlobal

Description

@RicardoGlobal

In the webpage https://www.arduino.cc/en/Reference/Return, in the code example there is an error:
it says:

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

there is a } missing just before the else.
It is obvious for programmers but could turn out to be a nightmare for novices.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions