Monday, October 14, 2013

Mod Operator

Divides two numbers and returns only the remainder.
Dim testResult As Double
testResult = 10 Mod 5
testResult = 10 Mod 3
testResult = 12 Mod 4.3
testResult = 12.6 Mod 5
testResult = 47.9 Mod 9.35
The expressions in the previous example return values of 0, 1, 3.4, 2.6, and 1.15.

If you familiar with foxpro, this operator same with %.

No comments:

Post a Comment