reference-en icon indicating copy to clipboard operation
reference-en copied to clipboard

Update while.adoc

Open Graybeard2ca opened this issue 4 years ago • 5 comments

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.

Graybeard2ca avatar Mar 06 '21 02:03 Graybeard2ca

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

Graybeard2ca avatar Mar 06 '21 02:03 Graybeard2ca

Sorry, clicked wrong control.

Graybeard2ca avatar Mar 06 '21 02:03 Graybeard2ca

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.

CLAassistant avatar Apr 09 '21 13:04 CLAassistant

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

Graybeard2ca avatar Apr 09 '21 15:04 Graybeard2ca

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.

Graybeard2ca avatar Apr 09 '21 15:04 Graybeard2ca