Skrim 11 Posted June 6, 2020 Delphi 10.4 procedure TForm1.Button1Click(Sender: TObject); var i : byte; j : integer; begin screen.Cursor:=crHourGlass; try j:=30000; i:=j; showmessage(inttostr(i)); finally screen.Cursor:=crDefault; end; end; If I set i=3 then inttostr gives me 3 If I set i=3000 then inttostr gives me 184 If I set i=30000 then inttostr gives me 48 I thought 3000 and 30000 would raise an exception, as they are out of range? Share this post Link to post
David Heffernan 2345 Posted June 6, 2020 (edited) You should enable both range checking and overflow checking. Then you'll see your exceptions. Edited June 6, 2020 by David Heffernan 1 Share this post Link to post
Skrim 11 Posted June 6, 2020 Thanks, I thought they were set by default. Moral, don't take anything for granted 🙂 Share this post Link to post
David Heffernan 2345 Posted June 6, 2020 2 hours ago, Skrim said: Thanks, I thought they were set by default. Moral, don't take anything for granted 🙂 They should be, don't know why Emba doesn't do this Share this post Link to post
Stefan Glienke 2007 Posted June 8, 2020 Give some more votes to https://quality.embarcadero.com/browse/RSP-16751 maybe we get it some day... 1 Share this post Link to post
David Heffernan 2345 Posted June 8, 2020 1 hour ago, Lars Fosdal said: qp is down again 😕 Couldn't take the traffic of tens of devs trying to vote for range checking enabled by default 1 3 Share this post Link to post
Sherlock 663 Posted June 8, 2020 Did my civic duty and helped push the server out of the mud.* Then voted for the issue. * Not really Share this post Link to post
Darian Miller 361 Posted June 8, 2020 7 hours ago, Stefan Glienke said: Give some more votes to https://quality.embarcadero.com/browse/RSP-16751 maybe we get it some day... +1 now up to 58 Share this post Link to post
TurboMagic 92 Posted August 29, 2020 On 6/8/2020 at 11:40 AM, David Heffernan said: Couldn't take the traffic of tens of devs trying to vote for range checking enabled by default I guess it's rather a missing overflow check in the server software for the vote counter 😉 But I guess this Jira software is not written in Delphi (oh, if it were overflow checking would be available and this issue would have been caught during testing...) Of course I voted for this as well. Share this post Link to post