Int64Static: Modulus |
Calculates the remainder of two 64-bit signed integers.
Public Function Modulus( ByRef Dividend As Int64, ByRef Divisor As Int64 ) As Int64
A modulus operation is used to calculate the remainder of a division operation.
Exception | Condition |
---|---|
DivideByZeroException | Attempt to divide by zero. |
The following code calculates the modulus of two 64-bit integers.
Public Sub Main() Dim x As Int64 Dim y As Int64 Dim r As Int64 x = CInt64(500) y = CInt64(55) r = Int64.Modulus(x, y) Debug.Print CorString.Format("The remainder of {0} / {1} = {2}.", x, y, r) End Sub 'This code produces the following. ' The remainder of 500 / 55 = 5.