mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
65 lines
1.4 KiB
XML
65 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>&& (logical AND)</name>
|
|
|
|
<category>Control</category>
|
|
|
|
<subcategory>Logical Operators</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image>logicalAND.gif</image>
|
|
<code>
|
|
for(int i=5; i<=95; i+=5) {
|
|
if((i > 35) && (i < 60)) {
|
|
stroke(0); //Set color to black
|
|
} else {
|
|
stroke(255); //Set color to white
|
|
}
|
|
line(30, i, 80, i);
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Compares two expressions and returns <b>true</b> only if both evaluate to <b>true</b>. Returns <b>false</b> if one or both evaluate to <b>false</b>. The following list shows all possible combinations:<br /><br /><tt>true && false // Evaluates false because the second is false <br />false && true // Evaluates false because the first is false <br />true && true // Evaluates true because both are true <br />false && false // Evaluates false because both are false</tt>
|
|
</description>
|
|
|
|
<syntax>
|
|
<c>expression1</c> && <c>expression2</c>
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>expression1</label>
|
|
<description>any valid expression</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>expression2</label>
|
|
<description>any valid expression</description>
|
|
</parameter>
|
|
|
|
<returns></returns>
|
|
|
|
<related>
|
|
|| (logical OR)
|
|
! (logical NOT)
|
|
if()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Operator</type>
|
|
|
|
<partof>PDE</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|