c_op_ass.htm
来自「Delphi脚本控件」· HTM 代码 · 共 347 行
HTM
347 行
<html>
<head>
<link rel=stylesheet type="text/css" href="styles.css">
</head>
<body>
<H1>
Compound Assignment Operators
</H1>
<table border="1">
<tr>
<th>Language Element</th>
<th>Short Description</th>
</tr>
<tr>
<td><a href="#Addition Assignment Operator (+=)"><b>Addition Assignment Operator (+=)</b></a></td>
<td>Adds the value of an expression to the value of a variable and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Bitwise AND Assignment Operator (&=)"><b>Bitwise AND Assignment Operator (&=)</b></a></td>
<td>Performs a bitwise AND on the value of a variable and the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Bitwise OR Assignment Operator (|=)"><b>Bitwise OR Assignment Operator (|=)</b></a></td>
<td>Performs a bitwise OR on the value of a variable and the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Bitwise XOR Assignment Operator (^=)"><b>Bitwise XOR Assignment Operator (^=)</b></a></td>
<td>Performs a bitwise exclusive OR on a variable and an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Division Assignment Operator (/=)"><b>Division Assignment Operator (/=)</b></a></td>
<td>Performs a division on the value of a variable and the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Left Shift Assignment Operator (<<=)"><b>Left Shift Assignment Operator (<<=)</b></a></td>
<td>Left shifts the value of a variable by the number of bits specified in the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Modulus Assignment Operator (%=)"><b>Modulus Assignment Operator (%=)</b></a></td>
<td>Divides the value of a variable by the value of an expression, and assigns the remainder to the variable.</td>
</tr>
<tr>
<td><a href="#Multiplication Assignment Operator (*=)"><b>Multiplication Assignment Operator (*=)</b></a></td>
<td>Performs a multiplication on the value of a variable and the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Right Shift Assignment Operator (>>=)"><b>Right Shift Assignment Operator (>>=)</b></a></td>
<td>Right shifts the value of a variable by the number of bits specified in the value of an expression, maintaining the sign, and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Subtraction Assignment Operator (-=)"><b>Subtraction Assignment Operator (-=)</b></a></td>
<td>Performs a subraction on the value of a variable and the value of an expression and assigns the result to the variable.</td>
</tr>
<tr>
<td><a href="#Unsigned Right Shift Assignment Operator (>>>=)"><b>Unsigned Right Shift Assignment Operator (>>>=)</b></a></td>
<td>Right shifts the value of a variable by the number of bits specified in the value of an expression, without maintaining sign, and assigns the result to the variable.</td>
</tr>
</table>
<a name="Addition Assignment Operator (+=)"><h3>Addition Assignment Operator (+=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Adds the value of an expression to the value of a variable and assigns the result to the variable.
<pre>
result += expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> + <font color="black"><i>expression</i></font>
</blockquote>
<a name="Bitwise AND Assignment Operator (&=)"><h3>Bitwise AND Assignment Operator (&=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise AND on the value of a variable and the value of an expression and assigns the result to the variable.
<pre>
result &= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> & <font color="black"><i>expression</i></font>
</blockquote>
<a name="Bitwise OR Assignment Operator (|=)"><h3>Bitwise OR Assignment Operator (|=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise OR on the value of a variable and the value of an expression and assigns the result to the variable.
<pre>
result |= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> | <font color="black"><i>expression</i></font>
</blockquote>
<a name="Bitwise XOR Assignment Operator (^=)"><h3>Bitwise XOR Assignment Operator (^=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise exclusive OR on a variable and an expression and assigns the result to the variable.
<pre>
result ^= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>.
</blockquote>
</blockquote>
Using the ^= operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> ^ <font color="black"><i>expression</i></font>
</blockquote>
<a name="Division Assignment Operator (/=)"><h3>Division Assignment Operator (/=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a division on the value of a variable and the value of an expression and assigns the result to the variable.
<pre>
result /= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> / <font color="black"><i>expression</i></font>
</blockquote>
<a name="Left Shift Assignment Operator (<<=)"><h3>Left Shift Assignment Operator (<<=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Left shifts the value of a variable by the number of bits specified in the value of an expression and assigns the result to the variable.
<pre>
result <<= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>.
</blockquote>
</blockquote>
Using the <<= operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> << <font color="black"><i>expression</i></font>
</blockquote>
<a name="Modulus Assignment Operator (%=)"><h3>Modulus Assignment Operator (%=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Divides the value of a variable by the value of an expression, and assigns the remainder to the variable.
<pre>
result %= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using the %= operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> % <font color="black"><i>expression</i></font>
</blockquote>
<a name="Multiplication Assignment Operator (*=)"><h3>Multiplication Assignment Operator (*=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a multiplication on the value of a variable and the value of an expression and assigns the result to the variable.
<pre>
result *= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> * <font color="black"><i>expression</i></font>
</blockquote>
<a name="Right Shift Assignment Operator (>>=)"><h3>Right Shift Assignment Operator (>>=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Right shifts the value of a variable by the number of bits specified in the value of an expression, maintaining the sign, and assigns the result to the variable.
<pre>
result >>= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>.
</blockquote>
</blockquote>
Using the >>= operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> >> <font color="black"><i>expression</i></font>
</blockquote>
<a name="Subtraction Assignment Operator (-=)"><h3>Subtraction Assignment Operator (-=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a subraction on the value of a variable and the value of an expression and assigns the result to the variable.
<pre>
result -= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>
</blockquote>
</blockquote>
Using this operator is exactly the same as specifying:
<font color="black"><i>result</i></font> = <font color="black"><i>result</i></font> - <font color="black"><i>expression</i></font>
</blockquote>
<a name="Unsigned Right Shift Assignment Operator (>>>=)"><h3>Unsigned Right Shift Assignment Operator (>>>=)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Right shifts the value of a variable by the number of bits specified in the value of an expression, without maintaining sign, and assigns the result to the variable.
<pre>
result >>>= expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>expression</i>
<blockquote>
Any <font color="black"><i>expression</i></font>.
</blockquote>
</blockquote>
Using the >>>= operator is exactly the same as specifying:
result = result >>> <font color="black"><i>expression</i></font>
</blockquote>
<p>
<HR>
<font size = 1 color ="gray">
Copyright © 1999-2005
VIRT Laboratory. All rights reserved.
</font>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?