Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2005 Aug : Problems with compiler directives R and Q
| Subject: | Problems with compiler directives R and Q |
| Posted by: | "Konstantin Knyazev" (kknyazev_no_spam_@mail.ru) |
| Date: | Fri, 19 Aug 2005 17:36:52 |
Hello!
I'm using Delphi7 and need to disable overflow and range checking only for
one line of code. Here is sample:
procedure TForm1.FormCreate(Sender: TObject);
var
i, j: Integer;
w1, w2: Cardinal;
begin
w1 := $FFFFFFFF;
w2 := $0;
{$R-,Q-}
i := w2 - w1;
{$R+,Q+}
end;
After rebuilding and running, this code generate overflow exception. I have
checked generated code and there are still overflow checking calls. What's
wrong? What i am doing wrong? Global settings is R+,Q+.
Thanks!
Best regards, Konstantin Knyazev