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

definitions of "Continue" and "Break" should be clear that they apply to the innermost loop #601

Open
dbaron opened this issue Jul 21, 2023 · 0 comments

Comments

@dbaron
Copy link
Member

dbaron commented Jul 21, 2023

The definitions of "Continue" and "Break" in the Iteration section should be clear on what the definitions mean in nested loops. Given that the behavior in most programming languages is that they apply to the inner-most loop, I suspect this is the behavior that's desired. However, I think it should be stated explicitly.

In other words, I think it should be stated explicitly somewhere that something like:

  1. For each doc in docs:
    1. ...
    2. While true:
      1. ...
      2. If X, Continue

The "Continue" continues to the next iteration of "While true", not to the next iteration of "For each doc in docs".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants
@dbaron and others