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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3278 - (show annotations) (download) (as text)
Mon Jun 5 19:02:59 2017 UTC (2 years, 11 months ago) by schoenebeck
File MIME type: text/html
File size: 1673 byte(s)
* NKSP: Added abort() function.

1 <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 <code lang="nksp">
22 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 <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 <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 message("First note was triggered!")
47 exit
48 case 2
49 message("Second note was triggered!")
50 exit
51 case 3
52 message("Third note was triggered!")
53 exit
54 end select
55
56 message("The " & $numberOfNotes & "th note triggered.")
57 end on
58 </code>
59
60 <h3>See also</h3>
61 <p><code>abort()</code>, <code>wait()</code><p>
62
63 <h3>Availability</h3>
64 <p>Since LinuxSampler 2.0.0<p>
65
66 </body>
67 </html>

  ViewVC Help
Powered by ViewVC