Mod Operator
Returns the integer remainder of a division.
Syntax:
Result = Expression1 MOD Expression2
Return value:
Integer
Parameters:
Result: Any numeric variable that contains the result of the MOD operation.
Expression1, Expression2: Any numeric expressions that you want to divide.
Example:
Sub ExampleMod
Print 10 Mod 2.5 ' returns 0
Print 10 / 2.5 ' returns 4
Print 10 Mod 5 ' returns 0
Print 10 / 5 ' returns 2
Print 5 Mod 10 ' returns 5
Print 5 / 10 ' returns 0.5
End Sub