/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_exit_function.html
ViewVC logotype

Annotation of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_exit_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3297 - (hide annotations) (download) (as text)
Wed Jun 28 10:48:30 2017 UTC (6 years, 9 months ago) by schoenebeck
File MIME type: text/html
File size: 1726 byte(s)
* NKSP: Added function callback_status().
* NKSP: Added built-in constant $CALLBACK_STATUS_QUEUE.
* NKSP: Added built-in constant $CALLBACK_STATUS_RUNNING.
* NKSP: Added built-in constant $CALLBACK_STATUS_TERMINATED.

1 schoenebeck 2732 <html>
2     <head>
3     <meta name="author" content="Christian Schoenebeck">
4     <title>exit() function</title>
5     <meta name="description" content="Stops execution of the current event handler instance.">
6     </head>
7     <body>
8     <h1>exit()</h1>
9     <p>
10     Stops execution of the current event handler instance.
11     It does <b>not</b> stop execution of other
12     instances of the same event handler, nor does it stop execution of other
13     handlers of other event types, and especially it does <b>not</b> stop or
14     prevent further or future execution of your entire script! In other words,
15     you should rather see this function as a return statement, in case you are
16     familiar with other programming languages already.
17     </p>
18    
19     <h3>Function Prototype</h3>
20     <p/>
21 schoenebeck 2742 <code lang="nksp">
22 schoenebeck 2732 exit()
23     </code>
24    
25     <h3>Arguments</h3>
26     <p>None.</p>
27    
28     <h3>Return Value</h3>
29     <p>None.</p>
30    
31     <h3>Examples</h3>
32 schoenebeck 3237 <p>
33     The following example prints a different message to the sampler's
34     terminal, depending on how many notes were triggered so far.
35     </p>
36 schoenebeck 2732 <code>
37     on init
38     declare $numberOfNotes
39     end on
40    
41     on note
42     $numberOfNotes := $numberOfNotes + 1
43    
44     select $numberOfNotes
45     case 1
46 schoenebeck 3237 message("First note was triggered!")
47 schoenebeck 2732 exit
48     case 2
49 schoenebeck 3237 message("Second note was triggered!")
50 schoenebeck 2732 exit
51     case 3
52 schoenebeck 3237 message("Third note was triggered!")
53 schoenebeck 2732 exit
54 schoenebeck 3237 end select
55 schoenebeck 2732
56     message("The " & $numberOfNotes & "th note triggered.")
57     end on
58     </code>
59    
60 schoenebeck 3278 <h3>See also</h3>
61 schoenebeck 3297 <p><code>abort()</code>, <code>wait()</code>, <code>fork()</code>, <code>callback_status()</code><p>
62 schoenebeck 3278
63     <h3>Availability</h3>
64     <p>Since LinuxSampler 2.0.0<p>
65    
66 schoenebeck 2732 </body>
67     </html>

  ViewVC Help
Powered by ViewVC