Page 1 of 1

About "Zc stack handling rewritten"

Posted: Wed Feb 11, 2009 8:12 am
by simsmen

Code: Select all

{$ifndef minimal}CheckValidIndex(Index);{$endif}
May be?

Code: Select all

 {$ifndef minimal}ZAssert((Index >= 0) and (Index < FCount), 'ZArrayList bad index');{$endif}

{$ifndef minimal}
procedure ZAssert(const Condition: Boolean; const aText: string);
begin
  if Condition then
    Exit;
  WriteLog(aText); 
  ZHalt(aText);
end;
{$endif}
This code may use in more place

Posted: Wed Feb 11, 2009 8:59 am
by VilleK
Good point. There is already a ZAssert in ZLog-unit so maybe I should use that instead.

Welcome to these forums simsmen! :)

Posted: Wed Feb 11, 2009 12:05 pm
by simsmen
Thanks:)

I do't see ZAssert earlier. My edition of ZAssert faster, if Condition is True