Tom Sheckells

Short Circuit Logic Evaluation

Discussion created by Tom Sheckells on Mar 13, 2009
Latest reply on Mar 14, 2009 by Tom Sheckells

My client has requested that I rearrange a large quantified expression to place the "most likely to cause a false condition" earlier in the logic (currently it is arranged in the same order of the columns of the database to make "human checking" easier.  His question is predicated on short-circuit evaluation of the logic clauses (its a large number of "and" conditions).  When I did some testing before messing with the condition, I tried writing this if statement in a function:

 

      if (numericField is not null and numericField > 0) then .....

 

and I got an exception when numericField is null.  To me, this indicates that even though the first clause in the expression is false, it goes on to evaluate the "> 0" test and gets an exception. 

 

So, the question is whether or not Blaze has implemented short-circuit logic evaluation and if so, where (obviously not in the if statement example from a function)?  Is it in rule evaluation in a ruleset?  Is it used in a quantified expression?  Anywhere???

 

Thanks,

 

Tom

Outcomes