Precedence level and associativity of operators The following table lists the precedence level of all operator classes from the highest to the lowest precedence. A few other syntactic constructions are also listed as references. {%latex: % % Note: the tables below should be kept in sync with the one in % manual/manual/refman/expr.etex . % \begin{tabular}{cc} \hline Operator class & Associativity \\ \hline $!\ldots$ $\tilde{}\ldots$ & -- \\ $.\cdots()$ $.\cdots[]$ $.\cdots\\{\\}$ & -- \\ \#\ldots & left \\ function application & left \\ - -. & -- \\ $**\ldots$ lsl lsr asr & right \\ $*\ldots$ /\ldots \%\ldots mod land lor lxor & left \\ +\ldots -\ldots & left \\ :: & right \\ @\ldots \textasciicircum\ldots & right \\ =\ldots <\ldots >\ldots |\ldots \&\ldots \$\ldots != & left \\ \& \&\& & right \\ or || & right \\ , & -- \\ <- := & right \\ if & -- \\ ; & right \\ \hline \end{tabular} %} {%html:
Operator classAssociativity
!… ~…
.…() .…[] .…{}
#… left
function application left
- -.
**… lsl lsr asr right
*… /… %… mod land lor lxor left
+… -… left
:: right
@… ^… right
=… <… >… |… &… $… != left
& && right
or || right
,
<- := right
if
; right
%} {%man: .IP Associativity Operator class .IP - !.. ~.. .IP - \&.() .[] .{} .IP left #.. .IP left function application .IP - - -. .IP right **.. lsl lsr asr .IP left *.. /.. %.. mod land lor lxor .IP left +.. -.. .IP right :: .IP right @.. ^.. .IP left =.. <.. >.. |.. &.. $.. != .IP right & && .IP right or || .IP - , .IP right <- := .IP - if .IP right ; %}