forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexit.xml
More file actions
executable file
·58 lines (37 loc) · 1.26 KB
/
Copy pathexit.xml
File metadata and controls
executable file
·58 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>exit()</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
void draw() {
line(mouseX, mouseY, 50, 50);
}
void mousePressed() {
exit();
}
]]></code>
</example>
<description><![CDATA[
Quits/stops/exits the program. Programs without a <b>draw()</b> function exit automatically after the last line has run, but programs with <b>draw()</b> run continuously until the program is manually stopped or <b>exit()</b> is run.
<br/> <br/>
Rather than terminating immediately, <b>exit()</b> will cause the sketch to exit after <b>draw()</b> has completed (or after <b>setup()</b> completes if called during the <b>setup()</b> method).
<br/> <br/>
For Java programmers, this is <em>not</em> the same as System.exit(). Further, System.exit() should not be used because closing out an application while draw() is running may cause a crash (particularly with OpenGL).
]]></description>
<syntax><![CDATA[
exit()
]]></syntax>
<parameter>
<label></label>
<description></description>
</parameter>
<returns>None</returns>
<related></related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>