Skip to content

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

@dbaron

Description

@dbaron

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions