add information and minor restructuring
This commit is contained in:
parent
95493e61bc
commit
7715adfebc
5 changed files with 9 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
@ -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`
|
||||
|
||||
|
|
@ -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
|
||||
```
|
||||
```
|
||||
|
||||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue