April 2002
Intermediate to advanced
688 pages
19h 51m
English
Mod Operator
result=number1Modnumber2
number1, number2 (required; any)A numeric expression
Returns the modulus
Returns the modulus, that is, the remainder when
number1 is divided by
number2. This return value is a
non-negative integral data type.
Floating point numbers are rounded to integers before the division.
If number1 or
number2 is Nothing,
then an error occurs.
The Mod operator returns the data type of
number1 and
number2 if they are the same type, or the
widest data type of number1 and
number2 if they are different.
MsgBox(10 Mod 3) ' returns 1
Read now
Unlock full access