Performs the modulus operation.
Mod ( value1, value2 )
| value1 | The dividend. |
| value2 | The divisor. |
| Success: | Returns the remainder when value1 is divided by value2. |
| Failure: | Returns -1.#IND if the divisor is zero. |
Local $n = 18
If Mod($n, 2) = 0 Then
MsgBox(0, "", $n & " is an even number.")
Else
MsgBox(0, "", $n & " is an odd number.")
EndIf
Local $x = Mod(4, 7) ;$x == 4 because the divisor > dividend
Local $y = Mod(1, 3 / 4) ;$y == 0.25 because the divisor is a float