What is the conditional to check if assertions are active in Delphi?
I would like to be able to do something to suppress hints about unused variables when assertions are not active in code like
procedure Whatever;
var
v : Integer;
begin
v := DoSomething;
Assert(v >= 0);
end;
In the above code, when assertions are not active, there is a hint about variable v being assigned a value that is never used.
The code is in a library which is going to be used in various environments, so I'd be able to test for assertions specifically, and not a custom conditional like DEBUG.
suppress...
method. Great way of suppressing those hints. Much better than adding a comment to some arbitrary statement that serves the same purpose. – Mcentire