basic_op_ar.htm
来自「Delphi脚本控件」· HTM 代码 · 共 223 行
HTM
223 行
<html>
<head>
<link rel=stylesheet type="text/css" href="styles.css">
</head>
<body>
<h3>
paxBasic Arithmetic Operators
</h3>
<table border="1">
<tr>
<th>Language element</th>
<th>Description</th>
</tr>
<tr>
<td><a href="#Exponentiation Operator (^)"><b>Exponentiation Operator (^)</b></a></td>
<td>Raises a number to the power of an exponent.</td>
</tr>
<tr>
<td><a href="#Multiplication Operator (*)"><b>Multiplication Operator (*)</b></a></td>
<td>Multiplies two numbers.</td>
</tr>
<tr>
<td><a href="#Division Operator (/)"><b>Division Operator (/)</b></a></td>
<td>Divides two numbers and returns a floating-point result.</td>
</tr>
<tr>
<td><a href="#Integer Division Operator (\)"><b>Integer Division Operator (\)</b></a></td>
<td>Divides two numbers and returns an integer result.</td>
</tr>
<tr>
<td><a href="#Mod Operator (Mod)"><b>Mod Operator (Mod)</b></a></td>
<td>Divides two numbers and returns only the remainder.</td>
</tr>
<tr>
<td><a href="#Addition Operator (+)"><b>Addition Operator (+)</b></a></td>
<td>Sums two numbers.</td>
</tr>
<tr>
<td><a href="#Subtraction Operator (-)"><b>Subtraction Operator (-)</b></a></td>
<td>Finds the difference between two numbers or indicates the negative value of a numeric expression.</td>
</tr>
</table>
<a name="Exponentiation Operator (^)"><h3>Exponentiation Operator (^)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Raises a number to the power of an exponent.
<pre>
result = number^exponent
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable.
</blockquote>
</blockquote>
<blockquote>
<i>number, exponent</i>
<blockquote>
Any numeric expression.
</blockquote>
</blockquote>
Number can be negative only if exponent is an integer value. When more than one exponentiation is performed in a single expression, the ^ operator is evaluated as it is encountered from left to right. If either number or exponent is a Null expression, <font color="black"><i>result</i></font> is also Null.
</blockquote>
<a name="Multiplication Operator (*)"><h3>Multiplication Operator (*)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Multiplies two numbers.
<pre>
result = number1*number2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expression
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Division Operator (/)"><h3>Division Operator (/)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Divides two numbers and returns a floating-point result.
<pre>
result = number1/number2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expressions
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Integer Division Operator (\)"><h3>Integer Division Operator (\)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Divides two numbers and returns an integer result.
<pre>
result = number1\number2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expressions
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Mod Operator (Mod)"><h3>Mod Operator (Mod)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Divides two numbers and returns only the remainder.
<pre>
result = number1 Mod number2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expressions
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Addition Operator (+)"><h3>Addition Operator (+)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Sums two numbers.
<pre>
result = number1 + number2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expressions
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Subtraction Operator (-)"><h3>Subtraction Operator (-)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Finds the difference between two numbers or indicates the negative value of a numeric expression.
<pre>
result = number1-number2
or
result = - number
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any numeric variable
</blockquote>
</blockquote>
<blockquote>
<i>number1, number2</i>
<blockquote>
Any numeric expression
</blockquote>
</blockquote>
If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</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 + -
显示快捷键?