Skip to content

Commit

Permalink
minor doc formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed Nov 9, 2013
1 parent ec877ce commit ab73026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/manual/variables-and-scoping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ For Loops and Comprehensions
For loops and comprehensions have a special additional behavior: any
new variables introduced in their body scopes are freshly allocated for
each loop iteration. Therefore these constructs are similar to ``while``
loops with ``let`` blocks inside:
loops with ``let`` blocks inside::

Fs = cell(2)
for i = 1:2
Expand All @@ -262,15 +262,15 @@ loops with ``let`` blocks inside:
julia> Fs[2]()
2

``for`` loops will reuse existing variables for iteration:
``for`` loops will reuse existing variables for iteration::

i = 0
for i = 1:3
end
i # here equal to 3

However, comprehensions do not do this, and always freshly allocate their
iteration variables:
iteration variables::

x = 0
[ x for x=1:3 ]
Expand Down

0 comments on commit ab73026

Please sign in to comment.