Mod: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 25: | Line 25: | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Math]] |
Revision as of 20:04, 14 September 2012
result = x Mod y
Description
Mod divides x by y and returns the integer part of the remainder. The required parameters, x and y, are any valid numeric expressions. The value of result is a whole number with a magnitude less than the magnitude of y.
Example
Rem Mod Example 'Mod returns quotient remainder as integer Dim Answer Answer = 15 Mod 2 Print "15 Mod 2 = " & Answer Answer = 21 Mod 3.7 Print "21 Mod 3.7 = " & Answer
Output
15 Mod 2 = 1 21 Mod 3.7 = 1