Returns from current execution block.
If the exit()
function was called from a
user function,
that user function is exited and execution continues from where that
user function was called (e.g. from another user function or an event
handler).
If the exit()
function was called directly from an
event handler, that event handler is exited (i.e. execution of that
event handler instance is stopped).
exit()
is a bit misleading. This function
behaves identical to return statements in other programming languages.
So calling exit()
does not stop execution of other
instances of the same event handler, nor does it stop execution of other
handlers of other event types, and especially it does not stop or
prevent further or future execution of your entire script!
exit()
None.
None.
The following example prints a different message to the sampler's terminal, depending on how many notes were triggered so far.
on init
declare $numberOfNotes
end on
on note
$numberOfNotes := $numberOfNotes + 1
select $numberOfNotes
case 1
message("First note was triggered!")
exit
case 2
message("Second note was triggered!")
exit
case 3
message("Third note was triggered!")
exit
end select
message("The " & $numberOfNotes & "th note triggered.")
end on
abort()
, wait()
, fork()
, callback_status()
Since LinuxSampler 2.0.0