📄 infix-ops.html
字号:
<html lang="en">
<head>
<title>Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="Infix%20Ops">Infix Ops</a>,
Previous:<a rel="previous" accesskey="p" href="Prefix-Ops.html#Prefix%20Ops">Prefix Ops</a>,
Up:<a rel="up" accesskey="u" href="Integer-Exprs.html#Integer%20Exprs">Integer Exprs</a>
<hr><br>
</div>
<h4 class="subsection">Infix Operators</h4>
<p><dfn>Infix operators</dfn> take two arguments, one on either side. Operators
have precedence, but operations with equal precedence are performed left
to right. Apart from <code>+</code> or <code>-</code>, both arguments must be
absolute, and the result is absolute.
<ol type=1 start=1>
<li>Highest Precedence
<dl>
<dt><code>*</code>
<dd><dfn>Multiplication</dfn>.
<br><dt><code>/</code>
<dd><dfn>Division</dfn>. Truncation is the same as the C operator <code>/</code>
<br><dt><code>%</code>
<dd><dfn>Remainder</dfn>.
<br><dt><code><</code>
<dd><dt><code><<</code>
<dd><dfn>Shift Left</dfn>. Same as the C operator <code><<</code>.
<br><dt><code>></code>
<dd><dt><code>>></code>
<dd><dfn>Shift Right</dfn>. Same as the C operator <code>>></code>.
</dl>
<li>Intermediate precedence
<dl>
<dt><code>|</code>
<dd>
<dfn>Bitwise Inclusive Or</dfn>.
<br><dt><code>&</code>
<dd><dfn>Bitwise And</dfn>.
<br><dt><code>^</code>
<dd><dfn>Bitwise Exclusive Or</dfn>.
<br><dt><code>!</code>
<dd><dfn>Bitwise Or Not</dfn>.
</dl>
<li>Low Precedence
<dl>
<dt><code>+</code>
<dd><dfn>Addition</dfn>. If either argument is absolute, the result has the section of
the other argument. You may not add together arguments from different
sections.
<br><dt><code>-</code>
<dd><dfn>Subtraction</dfn>. If the right argument is absolute, the
result has the section of the left argument.
If both arguments are in the same section, the result is absolute.
You may not subtract arguments from different sections.
<br><dt><code>==</code>
<dd><dfn>Is Equal To</dfn>
<br><dt><code><></code>
<dd><dfn>Is Not Equal To</dfn>
<br><dt><code><</code>
<dd><dfn>Is Less Than</dfn>
<dt><code>></code>
<dd><dfn>Is Greater Than</dfn>
<dt><code>>=</code>
<dd><dfn>Is Greater Than Or Equal To</dfn>
<dt><code><=</code>
<dd><dfn>Is Less Than Or Equal To</dfn>
<p>The comparison operators can be used as infix operators. A true results has a
value of -1 whereas a false result has a value of 0. Note, these operators
perform signed comparisons.
</dl>
</p><li>Lowest Precedence
<dl>
<dt><code>&&</code>
<dd><dfn>Logical And</dfn>.
<br><dt><code>||</code>
<dd><dfn>Logical Or</dfn>.
<p>These two logical operations can be used to combine the results of sub
expressions. Note, unlike the comparison operators a true result returns a
value of 1 but a false results does still return 0. Also note that the logical
or operator has a slightly lower precedence than logical and.
</dl>
</ol>
<p>In short, it's only meaningful to add or subtract the <em>offsets</em> in an
address; you can only have a defined section in one of the two arguments.
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -