Are there any other languages that support this kind of continue behavior?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Describe alternatives you've considered
Instead of aforeach, I could use afor elem in list; but this loses the index within the loop body. I could use afor idx in range([start], [end])with the boundaries of the list; but writing this is cumbersome.
vim9script
var myList = ["Hello", "World", "I", "Need", "Indices"]
for [idx, value] in items(myList)
echo idx value
endfor
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I think you just want return there.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I guess return 0 works. I didn't know this option. Thanks for sharing this @zeertzjq
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #18880 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq what would be the break equivalent?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()