Does Julia have a way of “naming” for
loops so that one can break
out of specific loops?
For example, I recently came across this example in Fortran:
program nestedLoop
implicit none
integer:: i, j, k
iloop: do i = 1, 3
jloop: do j = 1, 3
kloop: do k = 1, 3
print*, "(i, j, k): ", i, j, k
if (k==2) then
exit jloop
end if
end do kloop
end do jloop
end do iloop
end program nestedLoop
which produces
(i, j, k): 1 1 1
(i, j, k): 1 1 2
(i, j, k): 2 1 1
(i, j, k): 2 1 2
(i, j, k): 3 1 1
(i, j, k): 3 1 2
What would be the Julia equivalent?