|
|
coherent
precedence Definition precedence
Precedence refers to the property of each C operator that deter-
mines priority of execution. Operators are executed in order of
their degree of precedence, from highest to lowest.
The following table summarizes the precedence of C operators.
The are listed in descending order of precedence: those listed
higher in the table are executed before those lower in the table.
Operators listed on the same line have the same level of
precedence.
_O_p_e_r_a_t_o_r _A_s_s_o_c_i_a_t_i_v_i_t_y
___________________________________________
() [] -> . Left to right
___________________________________________
! ~ ++ -- - (_t_y_p_e) * & _s_i_z_e_o_fRight to left
___________________________________________
* / % Left to right
___________________________________________
+ - Left to right
___________________________________________
<< >> Left to right
___________________________________________
< <= > >= Left to right
___________________________________________
== != Left to right
___________________________________________
& Left to right
___________________________________________
^ Left to right
___________________________________________
| Left to right
___________________________________________
&& Left to right
___________________________________________
|| Left to right
___________________________________________
?: Right to left
___________________________________________
= += -= *= /= %= Right to left
___________________________________________
, Left to right
___________________________________________
You can always determine precedence in an expression by enclosing
sub-expressions within parentheses: the expression enclosed
within the innermost parentheses is always executed first.
***** See Also *****
definitions, operators
_T_h_e _C _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, ed. 2, page 48
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.