[julia-users] Re: leaky if semantics

2016-02-08 Thread Benjamin Deonovic
If you keep reading from the link you gave: The variable relation is declared inside the if block, but used outside. However, when depending on this behavior, make sure all possible code paths define a value for the variable. The following change to the above function results in a runtime

[julia-users] Re: leaky if semantics

2016-02-08 Thread elextr
The x is not kept between iterations of the for see http://docs.julialang.org/en/release-0.4/manual/variables-and-scoping/#for-loops-and-comprehensions On Monday, February 8, 2016 at 9:41:40 PM UTC+10, David van Leeuwen wrote: > > Hello, > > According to >