FIXED: if and ifs expressions only evaluate the one option

Selina, do you remember fixing that issue where both options in an if statement were executed? Was that fix only for if statements in scripts? Cause I’m running into this again, but this time in expressions.

We have to make this an RFE (I duplicated this the RFE Forum). The way it works right now, the if and ifs expression evaluate everything first before deciding what to return, making uses of opexist or similar only usable in a not straight forward way:

for example

if(opexists("/project1/network/chop"),chop("/project1/network/chop/chan1"),chop("/project1/network/itisalwaysthere/chan1"))

becomes

chop(ifs(opexists("/project1/network/chop"),"/project1/network/chop/chan1","/project1/network/itisalwaysthere/chan1"))

cheers
markus

Thanks for the workaround markus. Should cover some of the situations were this is an issue (i.e. if both options require the “same” expression).

yes, for now you’ll need Markus’ work around. the evaluation has only been fixed for scripts, not the if or ifs expressions. it’s going to take a while to look into, unfortunately.

This has now been fixed for if(), ifs(), || (logical or), && (logical and) expressions.
Thanks,
Rob.

yay, thanks