VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or

by Kris Senden (1 Submission)
Category: Math/Dates
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 23rd August 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or the integer division operator (\) causes an

Rate Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or




    ' round off the numerator and denominator (ensure number is .0)
    pNumerator = Int(pNumerator + 0.5)
    pDenominator = Int(pDenominator + 0.5)

    ' Emulate modulo arithmetic
    Modulo = pNumerator - (pDenominator * Fix(pNumerator / pDenominator))

End Function



Download this snippet    Add to My Saved Code

Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or Comments

No comments have been posted about Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or . Why not be the first to post a comment about Using a number larger than 2,147,483,647 (or smaller than -2,147,483,648) with the Mod operator or .

Post your comment

Subject:
Message:
0/1000 characters