Skip to content

improve "else" example #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Daniel-1276 opened this issue Oct 3, 2018 · 0 comments · Fixed by #451
Closed

improve "else" example #450

Daniel-1276 opened this issue Oct 3, 2018 · 0 comments · Fixed by #451

Comments

@Daniel-1276
Copy link

Affected document:
https://github.com/arduino/reference-en/blob/master/Language/Structure/Control%20Structure/else.adoc

Issue:
IMHO "&& temperature < 70" in condition2 is unnecessary.

Explanation:
condition1 is "true" if value is above "70". In this example all other "else" or "else if" conditions get ignored.
if value is below "70" first condition is "false" and second condition gets checked. This means already value is below 70 and must not be checked again.

Artoria2e5 added a commit to Artoria2e5/reference-en that referenced this issue Oct 3, 2018
Fix arduino#450. There is also a spelling problem with "precede".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant