true
or false
, and are most useful in boolean expressions, where they help to determine which portion of a program to execute.
true
or false
.
Table 11.1. Binary Boolean Operators in SuperCollider
Operator | Meaning |
---|---|
< | less than |
<= | less than or equal to |
> | greater than |
>= | greater than or equal to |
== | equivalent |
!= | not equivalent |
=== | identical (the same object) |
!== | not identical (not the same object) |
&& | logical And |
|| | logical Or |
true
or false
.
Table 11.2. Unary Boolean Operators in SuperCollider
Operator | Meaning |
---|---|
isPositive | true if the argument is greater than or equal to 0 |
isStrictlyPositive | true if the argument is greater than 0 |
isNegative | true if isPositive is false |
( var x = 5; x.isPositive; // returns "true" isNegative( x ); // returns "false" )