Houdini: The comparison operators
Comparisons
The comparison operators (==, !=, <, <=, >, >=) are defined when the
left hand of the operator is the same type as the right hand side,
for string, float and integer types only. The operations result in
integer types.
The logical (&&, ||, and !) and bitwise (& |, ^, and ~) operators are only defined for integers.
The logical (&&, ||, and !) and bitwise (& |, ^, and ~) operators are only defined for integers.
Precedence table
Operators higher in the table have higher precedence.
Order | Operator | Associativity | Description |
---|---|---|---|
15 | () | L to R | Function call, expression grouping, structure member. |
13 | ! | Logical negation | |
~ | One’s complement | ||
+ | Unary plus | ||
- | Unary minus | ||
++ | Increment | ||
-- | Decrement | ||
(typename) | Type cast | ||
12 | * | L to R | Multiplication |
/ | Division | ||
% | Modulus | ||
11 | + | L to R | Addition |
- | Subtraction | ||
10 | < | L to R | Less than |
> | Greater than | ||
<= | Less than or equal | ||
>= | Greater than or equal | ||
9 | == | L to R | Equal |
!= | Not equal | ||
8 | & | L to R | Bitwise AND |
7 | ^ | L to R | Bitwise exclusive OR |
6 | | | L to R | Bitwise OR |
5 | && | L to R | Logical AND |
4 | || | L to R | Logical OR |
3 | ? : | L to R | Ternary conditional |
2 | = | R to L | Assign to variable |
+= | Add and assign | ||
-= | Subract and assign | ||
*= | Multiply and assign | ||
/= | Divide and assign | ||
%= | Take modulus and assign | ||
&= | Take bitwise AND and assign | ||
|= | Take bitwise OR and assign | ||
^= | Take bitwise exclusive OR and assign | ||
1 | , | L to R | Argument separator |
1 コメント:
Thanks for recommending it! I moved on main software to Houdini. I've been focused much more python on the new blog now.
https://monkeyworkmemo2.blogspot.com/
コメントを投稿