Jump to content

Jump anywhere: Difference between revisions

add BQN
(fix <code> issue)
(add BQN)
Line 408:
{{out}}
<pre>Igual que la entrada de FutureBasic.</pre>
 
=={{header|BQN}}==
Jumping anywhere (akin to APL's `→`) is not possible in BQN, and BQN does not have labels either.
The main forms of jumping are within blocks.
=== Block predicates ===
These constitute conditional jumps. If the value is 0, the section following it is skipped.
<syntaxhighlight lang="bqn"> { 0 ? "Will not execute"; "Will execute" }
"Will execute"</syntaxhighlight>
=== Function calls ===
You can call a function from a block, temporarily jumping over to the function's body, and coming back.
<syntaxhighlight lang="bqn"> F←{𝕩⊣•Out"In Second"}
{
•Out "First"
F@
•Out "Last"
}</syntaxhighlight>
 
<syntaxhighlight>First
In Second
Last</syntaxhighlight>
 
=={{header|C}}==
236

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.