Inc runtime error
Original Reporter info from Mantis: djbutler
-
Reporter name: David Butler
Original Reporter info from Mantis: djbutler
- Reporter name: David Butler
Description:
The Inc operation gives a runtime error where addition does not.
This is also not consistent with Delphi which does not give a range check error with either Inc or addition.
var A : LongWord;
begin
A := $0FFFFFFF;
Inc(A, LongWord($F0000000));
// no runtime error if the above line is changed to:
// A := A + LongWord($F0000000);
end.
Steps to reproduce:
var A : LongWord;
begin
A := $0FFFFFFF;
Inc(A, LongWord($F0000000));
// no runtime error if the above line is changed to:
// A := A + LongWord($F0000000);
end.
Mantis conversion info:
- Mantis ID: 15304
- OS: Win32
- OS Build: Vista
- Build: 2.4.0rc1
- Platform: Win32, probably all
- Version: 2.5.1
- Fixed in version: 2.4.2
- Fixed in revision: 15175 (#75b5b6c7)
- Target version: 2.4.2