Flow-control structures: Difference between revisions

m
no edit summary
mNo edit summary
Line 1,031:
<lang jq># Emit at most one item from the stream generated by g:
def first(g): label $out | g | ., break $out;</lang>
 
=={{header|Julia}}==
Julia provides the @goto and @label macros for goto within functions. In addition, the "break" keyword is used for jumping out of a single loop.
<lang julia>
function example()
println("Hello ")
@goto world
println("Never printed")
@label world
println("world")
end
</lang>
 
=={{header|Kotlin}}==
4,108

edits