The information in this article applies to:
SYMPTOMSWhen 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 (\), you receive the following error message:
CAUSEThe Visual Basic Help topic for the Mod operator and the integer division operator (\) explains that if floating point numbers are used in the expression, they are converted to Longs first. Thus, if the floating point number is greater than the maximum value of a Long (2,147,483,647), or less than the minimum value for a long (-2,147,483,648), an overflow error will occur. RESOLUTIONThe following code demonstrates how to perform integer division and modulo arithmetic when the size of an operand is sufficiently large to cause overflow:
STATUSThis behavior is by design. Additional query words:
Keywords : kberrmsg kbVBp kbVBp400 kbVBp500 kbVBp600 kbGrpVB |
Last Reviewed: May 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |