return
Exits current function scope
return
will terminate execution of a block at the scope
level (eg function
, private
, etc)
Conceptually it is the same as break
except it doesn’t
require the scope name as a parameter and you can specify the exit
number rather than defaulting to 0.
return [ exit-number ]
function example {
out foo
return 13
out bar
}
example
exitnum
Running the above code would output:
foo
13
If we were to run the same code as above but with return
written without any parameters (ie instead of return 13
it
would be just return
), then you would see the following
output:
foo
0
Any process that has been initialised within a return
ed
scope will have their exit number updated to the value specified in
return
(or 0
if no parameter was passed).
exitnum
: Output the exit number of the previous
processexit
:
Exit murexbreak
:
Terminate execution of a block within your processes scopecontinue
: Terminate process of a block within a caller
functionout
: Print a string to the stdout with a trailing new
line characterprivate
: Define a private function blockfunction
: Define a function blockThis document was generated from builtins/core/structs/break_doc.yaml.
This site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Sat Aug 23 22:28:13 UTC 2025 against commit ad23f13ad23f131bfecd82ea8a12d9b3e92aab5d8398ae9.
Current version is 7.0.2129 (website) which has been verified against tests cases.