Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
twsg:dicas:precedencia_operadores [2007/12/14 11:49]
emerson created
twsg:dicas:precedencia_operadores [2007/12/14 12:37] (current)
emerson
Line 2: Line 2:
  
 Essas tabelas sempre são úteis na hora de programar Essas tabelas sempre são úteis na hora de programar
 +
 +
 +
 +
  
 ===== C++ ===== ===== C++ =====
  
-^  1     ​^         ​2 ​       ^   ​3 ​   ^    4     ​^ ​ 5  ^   ​6 ​    ​^  7 ^  8  ^ +^  1      ^         ​2 ​       ^   ​3 ​   ^    4     ​^ ​ 5     ​^   ​6 ​      ​^  7     ​^  8  ^ 
-| ::     ​|  dynamic_cast ​   |   ​! ​   |  delete ​ |  -  |  !=     ​| += | <<= | +| ::      |  dynamic_cast ​   |   ​! ​   |  delete ​ |  -     ​|  !=       ​| +=     ​%%<<=%% 
-| ()     ​|   ​static_cast ​   |   ​~ ​   | delete[] | << ​ | & and   ​| -= | >>= | +| ()      |   ​static_cast ​   |   ​~ ​   | delete[] | %%<<%% | & and     ​| -=     ​%%>>=%% 
-| []     ​| reinterpret_cast | (tipo) |    .*    | >> ​ \or   | *= | ,   ​+| []      | reinterpret_cast | (tipo) |    .*    | %%>>%% %%xor%% | *=     ​| ,       ​
-| .      |   ​const_cast ​    | sizeof |    ->​* ​  ​|  <  \| or   ​| /=     | +| .       ​|   ​const_cast ​    | sizeof | %%->*%%  ​|  <     ​%%| or%%  ​| /=     |         
-| ->     ​|      ++i         ​| ​  & ​   |    *     ​| ​ <= | && and  | %=     | +%%->%%  ​|      ++i         ​| ​  & ​   |    *     ​| ​%%<=%% | && and    | %=     |         
-| i++    |      --i         ​|   ​* ​   |    /     ​| ​ >  \|\| or | &​= ​    | +| i++     ​|      ​%%--i%%     |   ​* ​   |    /     ​| ​ >     ​%%|| or%% | &​= ​    |         
-| i--    |                  |  new   ​| ​   %     ​| ​ >= | ? :     ​| ^= |     ​+%%i--%% |                  |  new   ​| ​   %     ​| ​ >=    | ? :       ​%%^=%%         ​
-| typeid |                  | new[]  |    +     | ==  | =       ​| |= |     |+| typeid ​ |                  | new[]  |    +     ​| ​  ​==   | =         | %%|=%% |         | 
 + 
 + 
 + 
 +===== PHP ===== 
 + 
 + 1      ^     ​2 ​     ^   ​3 ​  ​^ ​  ​4 ​   ^  5   ​^ ​  ​6 ​   ^      7      ^^  8  ^ 
 +new     ​| ​  ​~ ​       |   ​* ​  | %%<<​%% |  ​==  ​ & ​    | =  ​| ​  ​%= ​   | and | 
 +| []      |   ​- ​       |   / ​  | %%>>​%% |  !=  | %%^%%  | += |   &​= ​   | xor | 
 +| ++      | (tipo) ​    ​| ​  ​% ​  ​| ​  < ​   | ===  | %%|%%  | -= | %%|=%% ​ | or  | 
 +| %%--%% ​ |   ​@ ​       |   ​+ ​  | %%<=%% | !==  |  && ​   | *= | %%^=%% ​ |  ,  | 
 +|         | instanceof |   ​- ​  ​| ​  > ​   |      | %%||%% | /= | %%<<​=%% |     | 
 +|         ​| ​  ​! ​       |   ​. ​  ​| ​  >​= ​  ​| ​     | ? :    | .= | %%>>​=%% ​|     |

Navigation