diff --git a/src/SUMMARY.md b/src/SUMMARY.md index d03a5eb..463ed3b 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -6,9 +6,9 @@ * [Variables](variables/page.md) * [Result](variables/result.md) * [Types](types.md) -* [Control Flow](control_flow/page.md) - * [Case Statements](control_flow/case.md) - * [For Loops & Iterators](control_flow/for_iterators.md) - * [Exceptions](control_flow/exceptions.md) +* [If, Else, While, Block](if_else_while.md) +* [Case Statements](case.md) +* [For Loops & Iterators](for_iterators.md) +* [Exceptions](exceptions.md) * [Functions]() * [Varargs](varargs.md) \ No newline at end of file diff --git a/src/control_flow/case.md b/src/case.md similarity index 100% rename from src/control_flow/case.md rename to src/case.md diff --git a/src/control_flow/exceptions.md b/src/exceptions.md similarity index 100% rename from src/control_flow/exceptions.md rename to src/exceptions.md diff --git a/src/control_flow/for_iterators.md b/src/for_iterators.md similarity index 92% rename from src/control_flow/for_iterators.md rename to src/for_iterators.md index b06ba22..6e9e122 100644 --- a/src/control_flow/for_iterators.md +++ b/src/for_iterators.md @@ -1,6 +1,6 @@ # For Loops & Iterators -Nimrod has first class iterators and syntax to use them, for loops. There are two kinds of iterator, and two special methods that for loops work with. +Nimrod has first class iterators and syntax to use them, for loops. The `continue` and `break` keywords also work inside of for loops. There are two kinds of iterator, and two special methods that for loops work with. ## `items` and `pair` diff --git a/src/control_flow/page.md b/src/if_else_while.md similarity index 67% rename from src/control_flow/page.md rename to src/if_else_while.md index 9879b3e..e978e96 100644 --- a/src/control_flow/page.md +++ b/src/if_else_while.md @@ -1,4 +1,4 @@ -# Control Flow +# If, Else, While, Block Nimrod many different control flow constructs, including the standard `if`s, `else`s, and `while`s. @@ -20,4 +20,6 @@ while true: else: echo "Correct!" break -``` \ No newline at end of file +``` + +When inside a loop, it is possible to use `continue` or `break` any point within the loop with the standard semantics, where `continue` skips to the next iteration and `break` ends the loop. \ No newline at end of file