Mod - Operator (Modulo)

Concerns

this operator converts the expressions to the right of the operator into numeric types and calculates the rest of an integer division.

Example

Dim V1 As Long, V2 As Long, V3 As Double

V1 := 210

V2 := 20

V3 := V1 MOD V2

Result:

V3 contains a value of 10, because 210 can be divided 10 times by 20 without any remaining, resulting in a rest of 10.

Alternative spelling is:

V3 := V1 % V2