Skip to content
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

Update while.adoc #821

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Graybeard2ca
Copy link

None of the While or While Loop explanations or tutorials make it entirely clear how the loop ends or what happens when it does end, and I've puzzled over this for some time. Also, some comparison is needed between If, While, Do While, and For to clarify what each is best for and when best to use them.
Also, NONE of these While explanations or tutorials mentions that you can use to get out of them early. An example using Break would be good on this page, too, such as using a sensor reading to interrupt the While before it's finished. Let's say, while a switch is open, keep running a motor until the switch closes. Can do this with If statement, how is while better?
There is one While Loop tutorial but it's far more complicated than necessary for a basic explanation.

None of the While or While Loop explanations or tutorials make it entirely clear how the loop ends or what happens when it does end, and I've puzzled over this for some time.  Also, some comparison is needed between If, While, Do While, and For to clarify what each is best for and when best to use them.
Also, NONE of these While explanations or tutorials mentions that you can use <break> to get out of them early.   An example using Break would be good on this page, too, such as using a sensor reading to interrupt the While before it's finished.  Let's say, while a switch is open, keep running a motor until the switch closes.  Can do this with If statement, how is while better?
@Graybeard2ca
Copy link
Author

that you can use Break to get out of them early.

@Graybeard2ca Graybeard2ca reopened this Mar 6, 2021
@Graybeard2ca
Copy link
Author

Sorry, clicked wrong control.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Graybeard2ca
Copy link
Author

I tried to sign the CLA but the link doesn't work.

@Graybeard2ca
Copy link
Author

I have tried to sign the CLA. The link goes to https://cla-assistant.io/arduino/reference-en?pullRequest=821 but the field is locked and I can't enter data. There are no other controls on the page.

@@ -69,7 +70,7 @@ while (var < 200) {
=== See also

[role="language"]

https://www.arduino.cc/reference/en/language/structure/control-structure/break/[Break^]
Copy link
Collaborator

@per1234 per1234 May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
https://www.arduino.cc/reference/en/language/structure/control-structure/break/[Break^]
* #LANGUAGE# link:../break[break]

@per1234 per1234 added the bug label May 8, 2022
@per1234 per1234 added the on hold The PR should not be merged at this time label Aug 13, 2022
@per1234 per1234 self-assigned this Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug on hold The PR should not be merged at this time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants