Mod Operator

Returns the integer remainder of a division.

Notkun:


Result = Expression1 MOD Expression2

Skilagildi:

Integer

Viðföng:

Result: Any numeric variable that contains the result of the MOD operation.

Expression1, Expression2: Any numeric expressions that you want to divide.

Dæmi:


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

Please support us!