forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile.xml
More file actions
executable file
·63 lines (42 loc) · 1.42 KB
/
while.xml
File metadata and controls
executable file
·63 lines (42 loc) · 1.42 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
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>while</name>
<category>Control</category>
<subcategory>Iteration</subcategory>
<usage>Web & Application</usage>
<example>
<image>while_.png</image>
<code><![CDATA[
int i = 0;
while (i < 80) {
line(30, i, 80, i);
i = i + 5;
}
]]></code>
</example>
<description><![CDATA[
Controls a sequence of repetitions. The <b>while</b> structure executes a series of statements continuously while the <b>expression</b> is <b>true</b>. The expression must be updated during the repetitions or the program will never "break out" of <b>while</b>.
<br /> <br />
This function can be dangerous because the code inside the <b>while</b> loop will not finish until the expression inside <b>while</b> becomes false. It will lock out all other code from running (e.g., mouse and keyboard events will not be updated). Be careful — if used incorrectly, this can lock up your code (and sometimes even the Processing environment itself).
]]></description>
<syntax>
while (<c>expression</c>) {
<c>statements</c>
}
</syntax>
<parameter>
<label>expression</label>
<description><![CDATA[a valid expression]]></description>
</parameter>
<parameter>
<label>statements</label>
<description><![CDATA[one or more statements]]></description>
</parameter>
<returns></returns>
<related>
for
</related>
<availability>1.0</availability>
<type>Structure</type>
<partof>PDE</partof>
</root>