Flow-control structures: Difference between revisions
Content added Content deleted
m (→Flowcharts?) |
mNo edit summary |
||
Line 1,031: | Line 1,031: | ||
<lang jq># Emit at most one item from the stream generated by g: |
<lang jq># Emit at most one item from the stream generated by g: |
||
def first(g): label $out | g | ., break $out;</lang> |
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}}== |
=={{header|Kotlin}}== |