Table 7-1. Arithmetic Operators(表7-1算术操作符)
example name result
$a + $b Addition Sum of $a and $b.?/FONT>
$a - $b Subtraction Remainder of $b subtracted from $a.?/FONT>
$a * $b Multiplication Product of $a and $b.?/FONT>
$a / $b Division Dividend of $a and $b.?/FONT>
$a % $b Modulus Remainder of $a divided by $b.
其中,除法操作符“/”返回一个整数值(整数除法的结果)如果两个操作数是整数(或者是被转化成整数的字符串)的话。如果任意一个操作数是浮点数,那么将进行浮点运算。
文章来源于领测软件测试网 https://www.ltesting.net/