Option to turn off short-circuit boolean evaluation

23 Views Asked by At

So I have a user-definable script that may look something like this:

Result := (File.Size > 1000) OR (Image.Type = 'PNG');

My application requires that I know which objects were tested for, in this case File.Size and Image.Type. To do this, in the OnEval of the respective functions, I add the Object.Method name to a string list, which I can use later.

However, if the first condition (File.Size) is met, DWScript does not evaluate the second condition.

Is there a way to force DWScript to evaluate both conditions?

Thanks in advance.

Ray

1

There are 1 best solutions below

1
Nag On

That is a default behaviour for Delphi for ages