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

Commit

Permalink
Merge pull request #8 from pao/patch-1
Browse files Browse the repository at this point in the history
Added something about the Cartesian `for` loop
  • Loading branch information
StefanKarpinski committed Mar 10, 2012
2 parents 7debc01 + 86f7d7a commit 25cf8ef
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 25cf8ef

Please sign in to comment.