Mod Operator

Returns the integer remainder of a division.

Syntaks


Result = Expression1 MOD Expression2

Returverdi

Heltall

Parameter

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

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

Eksempel:


Sub ExampleMod
    Print 10 Mod 2.5 ' returns 0
    Print 10 / 2.5 ' returns 4
    Print 10 Mod 5 ' returns 0
    Print 10 / 5 ' returns 2
    Print 5 Mod 10 ' returns 5
    Print 5 / 10 ' returns 0.5
End Sub

Supporter oss!