iif evaluates both conditions?
Posted: Fri Nov 18, 2011 10:26 am
Hi!
Just figured out that iif can't be used to avoid division by zero errors.
a = iif ( b=0, 0, 5/b) ; fails when b is zero
It's a shame that all of the results are evaluating apart from the result of the condition.
I think it is a Lua "feature", but tested similar method on php and behaves just like Hollywood.
I don't think Andreas would change this, so I just wanted to remind you.
Bye!
Just figured out that iif can't be used to avoid division by zero errors.
a = iif ( b=0, 0, 5/b) ; fails when b is zero
It's a shame that all of the results are evaluating apart from the result of the condition.
I think it is a Lua "feature", but tested similar method on php and behaves just like Hollywood.
I don't think Andreas would change this, so I just wanted to remind you.
Bye!