add information and minor restructuring

This commit is contained in:
flaviut 2014-05-29 17:46:44 -04:00
commit 7715adfebc
5 changed files with 9 additions and 7 deletions

View file

@ -6,9 +6,9 @@
* [Variables](variables/page.md) * [Variables](variables/page.md)
* [Result](variables/result.md) * [Result](variables/result.md)
* [Types](types.md) * [Types](types.md)
* [Control Flow](control_flow/page.md) * [If, Else, While, Block](if_else_while.md)
* [Case Statements](control_flow/case.md) * [Case Statements](case.md)
* [For Loops & Iterators](control_flow/for_iterators.md) * [For Loops & Iterators](for_iterators.md)
* [Exceptions](control_flow/exceptions.md) * [Exceptions](exceptions.md)
* [Functions]() * [Functions]()
* [Varargs](varargs.md) * [Varargs](varargs.md)

View file

@ -1,6 +1,6 @@
# For Loops & Iterators # 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` ## `items` and `pair`

View file

@ -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. Nimrod many different control flow constructs, including the standard `if`s, `else`s, and `while`s.
@ -20,4 +20,6 @@ while true:
else: else:
echo "Correct!" echo "Correct!"
break 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.