Delphi / Object Pascal · Exception
What does Runtime Error 215: EIntOverflow (arithmetic overflow) mean in Delphi / Object Pascal?
An integer arithmetic operation produced a result too large for the destination integer type, distinct from EOverflow in that this covers integer types, not floating-point.
An integer arithmetic operation produced a result too large for the destination integer type, distinct from EOverflow in that this covers integer types, not floating-point.
Check the destination variable's integer type range against the largest value the calculation can produce, and consider a wider type (Int64) if the legitimate range of results exceeds a 32-bit integer.