Looking inside the code of IfThen in StrUtils, it do not looks (evaluate) the ATrue value if the condition is not sitisfied.
That has nothing to do with it.
The parameters are evaluated at the time you call the function.
Say you have a function like this:
function foo(x,y: integer): integer;
Then you call it like
Now, you would not be surprised that you get an exception (div by zero).
Suppose you also have a function like this:
function bar(a,b: integer): integer;
begin
result := a div b;
end;
And then you do this:
This will of course also raise an exception
Now this
function foo(b: boolean; x,y: integer): integer;
...
z:= foo(False, 1, bar(1,0));
This will crash regardless of the implementation of foo (so even if the imeplementation of foo is completely empty).
Bart