| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| Expand Up | @@ -166,15 +166,13 @@ arguments. In chapter :ref:`tut-structures`, we will discuss in more detail abo | |||||
| The :keyword:`break` statement breaks out of the innermost enclosing | ||||||
| :keyword:`for` or :keyword:`while` loop. | ||||||
|
|
||||||
| A :keyword:`!for` or :keyword:`!while` loop can include an :keyword:`!else` clause. | ||||||
| The :keyword:`!break` statement may be paired with an :keyword:`!else` clause. | ||||||
| If the loop exits without executing the break, the else clause executes. | ||||||
|
|
||||||
| In a :keyword:`for` loop, the :keyword:`!else` clause is executed | ||||||
| after the loop reaches its final iteration. | ||||||
| after the loop reaches its final iteration if no break occurred. | ||||||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
I think this is clearer.
Sorry, something went wrong.
All reactions
|
||||||
|
|
||||||
| In a :keyword:`while` loop, it's executed after the loop's condition becomes false. | ||||||
|
|
||||||
| In either kind of loop, the :keyword:`!else` clause is **not** executed | ||||||
| if the loop was terminated by a :keyword:`break`. | ||||||
|
Comment thread
Comment on lines
-176
to
-177
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWe should keep this sentence. It underscores the semantics.
Sorry, something went wrong.
All reactions
|
||||||
| In a :keyword:`while` loop, it's executed after the loop's condition becomes false if no break occurred. | ||||||
|
|
||||||
| This is exemplified in the following :keyword:`!for` loop, | ||||||
| which searches for prime numbers:: | ||||||
| Expand Down | ||||||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualitySorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.