Rhinoscript:operators
From ksteinfeWiki
Contents |
Logical Operators
Logical operators allow us to make logical choices in program flow
Or (logical or)
Compares two expressions and returns true if one or both evaluate to true. Returns false only if both expressions are false.
And (logical and)
Compares two expressions and returns true only if both evaluate to true. Returns false if one or both evaluate to false.
Not (logical not)
Inverts the Boolean value of an expression. Returns true if the expression is false and returns false if the expression is true. If the expression a>b evaluates to true, then Not a>b evaluates to false.
AndAlso
TODO:
OrElse
TODO:
Xor
TODO:
Comparison Operators
< (less than)
Tests if the value on the left is smaller than the value on the right.
>= (greater than or equal to)
Tests if the value on the left is larger than the value on the right or if the values are equivalent.
<= (less than or equal to)
Tests if the value on the left is less than the value on the right or if the values are equivalent.
= (equality)
Determines if two values are equivalent. The equality operator is different from the assignment operator.
> (greater than)
Tests if the value on the left is larger than the value on the right.
<> (inequality)
Determines if one expression is not equivalent to another.
Mathematic Operators
^ (exponentiation)
Raises preceding value to the exponent of the following value
- (negation)
reverses the sign of the following value
* (multiplication)
Multiplies preceding value by the following value
/ (division)
Divides preceding value by the following value
\ (integer division)
Divides preceding value by the following value, and returns the nearest integer number
Mod (modulus arithmetic)
Divides preceding value by the following value, and returns the remainder
+ (addition)
Sums the preceding value and the following value
- (subtraction)
Subtracts the following value from the preceding value.
Concatenation Operators
Concatenation operators join multiple strings into a single string.
& (string concatenation)
Determines if one expression is not equivalent to another.
