Houdini: The comparison operators


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.

Precedence table

Operators higher in the table have higher precedence.

15()L to RFunction call, expression grouping, structure member.
13! Logical negation
~One’s complement
+Unary plus
-Unary minus
(typename)Type cast
12*L to RMultiplication
11+L to RAddition
10<L to RLess than
>Greater than
<=Less than or equal
>=Greater than or equal
9==L to REqual
!=Not equal
8&L to RBitwise AND
7^L to RBitwise exclusive OR
6|L to RBitwise OR
5&&L to RLogical AND
4||L to RLogical OR
3? :L to RTernary conditional
2=R to LAssign 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 RArgument separator

1 コメント:

narayana p さんのコメント...

I like your blog, I read this blog please update more content on python, further check it once at python online training