...

View Full Version : Operator Precedence



voko
03-10-2005, 01:54 PM
1st i need to prioritise operators. How do i do that?

highiest ------------------------------lowest priority

^ *,/ +,- <,>,=... & (and) |(or)

liorean
03-10-2005, 02:22 PM
Highest to lowest priority. All in the same category have the same priority and are evaluated on a left-to-right basis.
Category Operators
---- ----
Member .
[]

Call ()
new

Unary !
~
-
+
++
--
typeof
void
delete

Multiplicative *
/
%


Additive +
-

Bitwise shift <<
>>
>>>

Relational <
<=
>
>=
in
instanceof

Equality ==
===
!=
!==

Bitwise AND &

Bitwise XOR ^

Bitwise OR |

Logical AND &&

Logical OR ||

Conditional ?:

Assignment =
+=
-=
*=
/=
%=
<<=
>>=
>>>=
&=
^=
|=

Sequential ,



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum