Jump anywhere: Difference between revisions

Content added Content deleted
No edit summary
Line 992: Line 992:
=={{header|EMal}}==
=={{header|EMal}}==
<syntaxhighlight lang="emal">
<syntaxhighlight lang="emal">
^|EMal has no goto statement.
type JumpAnywhere
|The closes statements are break, continue, return, exit
^|EMal has no goto statement, but supports exceptions.
|and exceptions management.
|The following are the basic EMal jumps.
|^
|^
fun sample = void by block
fun sample = void by block
Line 1,009: Line 1,009:
sample()
sample()
type StateMachine
type StateMachine
^|this code shows how to selectevely jump
^|this code shows how to selectevely jump to specific code
|to simulate a state machine as decribed here:
|to simulate a state machine as decribed here:
|https://wiki.tcl-lang.org/page/A+tiny+state+machine
|https://wiki.tcl-lang.org/page/A+tiny+state+machine
Line 1,042: Line 1,042:
{{out}}
{{out}}
<pre>
<pre>
./JumpAnywhere.emal 2
emal.exe Org\RosettaCode\JumpAnywhere.emal 2
i = 2
i = 2
i = 3
i = 3