Originally Posted by
SilverWarior
When you are using multiconditional if statment all conditions get checked even if first condition isn't met already.
This is not true. I can demonstrate that with simple example:
Code:
var sl: TStringList;
begin
sl:=nil;
// Version 1: No errors
if (sl<>nil) and (sl.Add('Test')>0) then exit;
// Version 2: Runtime error
//if (sl.Add('Test')>0) then exit;
If-statement ends in the (sl<>nil) condition, because any further conditionals wouldn't change the logical end result. If there was OR, instead of AND, then it would have to proceed to next comparison because (sl<>nil)=false.
edit: Have you double/triple-checked the drawing code, or done analyzing to the chunks to see if traps are actually generated, just hidden.
Bookmarks