When I write local x,y = ...
, this means that both x
and y
are local
? Can someone confirm this? Ideally pointing to somewhere in the documentation where this is clarified. Thanks.
Easy to conduct experiment:
julia> function foo()
x, y = 0, 0
for i in 1:2
local x, y = i, i
end
return x, y
end
foo (generic function with 2 methods)
julia> foo()
(0, 0)
so yes.
2 Likes