Delphi / Object Pascal · Exception
What does EIntOverflow Exception mean in Delphi / Object Pascal?
Raised when an integer arithmetic operation produces a result too large to fit the register/type used to hold it, under $Q+ overflow checking - most often multiplication or repeated addition on Integer/Int64 values that grow beyond the type's range.
Raised when an integer arithmetic operation produces a result too large to fit the register/type used to hold it, under $Q+ overflow checking - most often multiplication or repeated addition on Integer/Int64 values that grow beyond the type's range.
Use a wider integer type such as Int64 for accumulators that can grow large, or Currency/Extended for money-like totals, and keep overflow checking enabled in debug builds so the bug surfaces during testing instead of silently wrapping in release.