Tagged Questions
1
vote
3answers
160 views
Delphi 2007 - programmatic manipulation of the “exceptions to ignore” list
I have an application which occasionally returns an integer overflow when FormatDateTime is called. I have no idea what scenario triggers this, although I have found mention of the problem here and ...
4
votes
1answer
2k views
Delphi: How do i use $OVERFLOWCHECKS OFF to disable overflow checks?
i have bit of code that causes an underflow:
var
t1, t2, delta: DWORD:
begin
t1 := 0xffffff00;
t2 := 0x00000037;
delta := (t2 - t1);
The subtraction itself does generate an overflow ...
7
votes
4answers
2k views
Delphi: How to avoid EIntOverflow underflow when subtracting?
Microsoft already says, in the documentation for GetTickCount, that you could never compare tick counts to check if an interval has passed. e.g.:
Incorrect (pseudo-code):
DWORD endTime = ...
10
votes
6answers
1k views
Should I use unsigned integers for counting members?
Should I use unsigned integers for my count class members?
Answer
For example, assume a class
TList <T> = class
private
FCount : Cardinal;
public
property Count : Cardinal read FCount;
...