forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif.xml
More file actions
executable file
·63 lines (42 loc) · 1.2 KB
/
if.xml
File metadata and controls
executable file
·63 lines (42 loc) · 1.2 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>if</name>
<category>Control</category>
<subcategory>Conditionals</subcategory>
<usage>Web & Application</usage>
<example>
<image>if_.png</image>
<code><![CDATA[
for (int i = 5; i < height; i += 5) {
stroke(255); // Set the color to white
if (i < 35) { // When 'i' is less than 35...
stroke(0); //...set the color to black
}
line(30, i, 80, i);
}
]]></code>
</example>
<description><![CDATA[
Allows the program to make a decision about which code to execute. If the <b>test</b> evaluates to <b>true</b>, the statements enclosed within the block are executed and if the <b>test</b> evaluates to <b>false</b> the statements are not executed.
]]></description>
<syntax>
if (<c>test</c>) {
<c>statements</c>
}
</syntax>
<parameter>
<label>test</label>
<description><![CDATA[any valid expression that evaluates to true or false]]></description>
</parameter>
<parameter>
<label>statements</label>
<description><![CDATA[one or more statements to be executed]]></description>
</parameter>
<returns></returns>
<related>
else
</related>
<availability>1.0</availability>
<type>Structure</type>
<partof>PDE</partof>
</root>