Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

Added something about the Cartesian for loop #8

Merged
merged 1 commit into from
Mar 10, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions manual/control-flow/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,16 @@ The `continue` keyword accomplishes this:
This is a somewhat contrived example since we could produce the same behavior more clearly by negating the condition and placing the `println` call inside the `if` block.
In realistic usage there is more code to be evaluated after the `continue`, and often there are multiple points from which one calls `continue`.

Multiple nested `for` loops can be combined into a single outer loop, forming the Cartesian product of its iterables:

julia> for i = 1:2, j = 3:4
println((i, j))
end
(1,3)
(1,4)
(2,3)
(2,4)

## Exception Handling

When an unexpected condition occurs, a function may be unable to return a reasonable value to its caller.
Expand Down