--- doc/docbase/instrument_scripts/nksp/reference/functions/nksp_exit_function.html 2020/06/05 09:29:25 3784 +++ doc/docbase/instrument_scripts/nksp/reference/functions/nksp_exit_function.html 2020/06/07 15:23:47 3785 @@ -2,20 +2,34 @@ exit() function - +

exit()

- Stops execution of the current event handler instance. - It does not stop execution of other + 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). +

+ + The function name 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! In other words, - you should rather see this function as a return statement, in case you are - familiar with other programming languages already. -

- + prevent further or future execution of your entire script! +
+

Function Prototype