Debian Codegraph @

opprec-table.sgml

raw
1 <table>
2 <title>Operator Precedence</title>
3 <tgroup cols="3">
4 <thead>
5 <row>
6 <entry>Operator</entry>
7 <entry>Meaning</entry>
8 <entry>Comments</entry>
9 </row>
10 </thead>
11 <tbody>
12 <row>
13 <entry><option></option></entry>
14 <entry></entry>
15 <entry><command>HIGHEST PRECEDENCE</command></entry>
16 </row>
17 <row>
18 <entry><option>var++ var--</option></entry>
19 <entry>post-increment, post-decrement</entry>
20 <entry><link linkend="cstyle">C-style</link> operators</entry>
21 </row>
22 <row>
23 <entry><option>++var --var</option></entry>
24 <entry>pre-increment, pre-decrement</entry>
25 <entry></entry>
26 </row>
27 <row>
28 <entry></entry>
29 <entry></entry>
30 <entry></entry>
31 </row>
32 <row>
33 <entry><option>! ~</option></entry>
34 <entry><link linkend="notref">negation</link></entry>
35 <entry>logical / bitwise, inverts sense of following
36 operator</entry>
37 </row>
38 <row>
39 <entry></entry>
40 <entry></entry>
41 <entry></entry>
42 </row>
43 <row>
44 <entry><option>**</option></entry>
45 <entry><link
46 linkend="exponentiationref">exponentiation</link></entry>
47 <entry><link linkend="arops1">arithmetic
48 operation</link></entry>
49 </row>
50 <row>
51 <entry><option>* / %</option></entry>
52 <entry>multiplication, division, modulo</entry>
53 <entry>arithmetic operation</entry>
54 </row>
55 <row>
56 <entry><option>+ -</option></entry>
57 <entry>addition, subtraction</entry>
58 <entry>arithmetic operation</entry>
59 </row>
60 <row>
61 <entry></entry>
62 <entry></entry>
63 <entry></entry>
64 </row>
65 <row>
66 <entry><option>&lt;&lt; &gt;&gt;</option></entry>
67 <entry>left, right shift</entry>
68 <entry><link linkend="bitwsops1">bitwise</link></entry>
69 </row>
70 <row>
71 <entry></entry>
72 <entry></entry>
73 <entry></entry>
74 </row>
75 <row>
76 <entry><option>-z -n</option></entry>
77 <entry><firstterm>unary</firstterm> comparison</entry>
78 <entry>string is/is-not <link
79 linkend="stringnull">null</link></entry>
80 </row>
81 <row>
82 <entry><option>-e -f -t -x, etc.</option></entry>
83 <entry><firstterm>unary</firstterm> comparison</entry>
84 <entry><link linkend="fto">file-test</link></entry>
85 </row>
86 <row>
87 <entry><option>&lt; -lt &gt; -gt &lt;= -le &gt;= -ge</option></entry>
88 <entry><firstterm>compound</firstterm> comparison</entry>
89 <entry>string and integer</entry>
90 </row>
91 <row>
92 <entry><option>-nt -ot -ef</option></entry>
93 <entry><firstterm>compound</firstterm> comparison</entry>
94 <entry>file-test</entry>
95 </row>
96 <row>
97 <entry><option>== -eq <link linkend="notequal">!=</link>
98 -ne</option></entry>
99 <entry>equality / inequality</entry>
100 <entry>test operators, string and integer</entry>
101 </row>
102 <row>
103 <entry></entry>
104 <entry></entry>
105 <entry></entry>
106 </row>
107 <row>
108 <entry><option>&amp;</option></entry>
109 <entry>AND</entry>
110 <entry>bitwise</entry>
111 </row>
112 <row>
113 <entry><option>^</option></entry>
114 <entry>XOR</entry>
115 <entry><firstterm>exclusive</firstterm> OR, bitwise</entry>
116 </row>
117 <row>
118 <entry><option>|</option></entry>
119 <entry>OR</entry>
120 <entry>bitwise</entry>
121 </row>
122 <row>
123 <entry></entry>
124 <entry></entry>
125 <entry></entry>
126 </row>
127 <row>
128 <entry><option>&amp;&amp; -a</option></entry>
129 <entry>AND</entry>
130 <entry><link linkend="logops1">logical</link>,
131 <firstterm>compound</firstterm>
132 comparison</entry>
133 </row>
134 <row>
135 <entry><option>|| -o</option></entry>
136 <entry>OR</entry>
137 <entry>logical, <firstterm>compound</firstterm>
138 comparison</entry>
139 </row>
140 <row>
141 <entry></entry>
142 <entry></entry>
143 <entry></entry>
144 </row>
145 <row>
146 <entry><option>?:</option></entry>
147 <entry><link linkend="cstrinary">trinary
148 operator</link></entry>
149 <entry>C-style</entry>
150 </row>
151 <row>
152 <entry><option>=</option></entry>
153 <entry><link linkend="eqref">assignment</link></entry>
154 <entry>(do not confuse with equality
155 <firstterm>test</firstterm>)</entry>
156 </row>
157 <row>
158 <entry><option>*= /= %= += -= &lt;&lt;= &gt;&gt;= &amp;=</option></entry>
159 <entry><link linkend="arithopscomb">combination
160 assignment</link></entry>
161 <entry>times-equal, divide-equal, mod-equal, etc.</entry>
162 </row>
163 <row>
164 <entry></entry>
165 <entry></entry>
166 <entry></entry>
167 </row>
168 <row>
169 <entry><option>,</option></entry>
170 <entry><link linkend="commaop">comma</link></entry>
171 <entry>links a sequence of operations</entry>
172 </row>
173 <row>
174 <entry><option></option></entry>
175 <entry></entry>
176 <entry><command>LOWEST PRECEDENCE</command></entry>
177 </row>
178 </tbody>
179 </tgroup>
180 </table>