You're probably looking for @goto ;-)
Although break may be what you want:
julia> for i=1:10
for j=1:10
if j==3
break
end
end
println(i,j)
end
13
23
33
43
53
63
73
83
93
103
On Fri, 2016-06-10 at 21:26, Ford O. <[email protected]> wrote:
> Why is there no keyword that would allow programmer to do
>
> var = begin # any block, including : let, if, function, macro, for, while ....
> in = user_input()
> if in == something
> `kw` true # immediately jumps out of this block
> #lots of code....
> false
> end
>
>
> Note that I wanna jump only one level above, not like break or return
> keywords.
>
> P.S. Why loops don't return the last line executed value like all other blocks
> do?