\<bookmark_value\>MOD operator (mathematical)\</bookmark_value\>

Mod Operator

Returns the integer remainder of a division.

Syntax:

Result = Expression1 MOD Expression2

Return value:

Integer

Parameters:

\<emph\>Result:\</emph\> Any numeric variable that contains the result of the MOD operation.

\<emph\>Expression1, Expression2:\</emph\> Any numeric expressions that you want to divide.

Example:

Sub ExampleMod

    print 10 mod 2.5 REM returns 0

    print 10 / 2.5 REM returns 4

    print 10 mod 5 REM returns 0

    print 10 / 5 REM returns 2

    print 5 mod 10 REM returns 5

    print 5 / 10 REM returns 0.5

End Sub