hi
Does MC practice "short circuit" when evaluating conditional expressions ?
Example, i have a statement
IF Condition A and Condition B then ....
Is MC smart enough to say if Condition A is false.. then don't bother evaluating condition B since the whole statement would be false anyway.....
Or does it brute force.. evaluate both conditions then decide if the whole statement is true or false ?
thank you
Evaluation of easylanguage expressions
Re: Evaluation of easylanguage expressions
Does anyone in TSSupport have any idea how such easylanguage expressions are evaluated ?hi
Does MC practice "short circuit" when evaluating conditional expressions ?
Example, i have a statement
IF Condition A and Condition B then ....
Is MC smart enough to say if Condition A is false.. then don't bother evaluating condition B since the whole statement would be false anyway.....
Or does it brute force.. evaluate both conditions then decide if the whole statement is true or false ?
thank you
It is strange to evaluate from right to left....PowerLanguage is smart enough and won't evaluate the second condition if the first condition is false. But you should keep in mind that in TS EasyLanguage such conditional expressions are evaluated not from left to right as in many other languages including PowerLanguage but from right to left.
So confirm for this statement
IF Condition A and Condition B then ....
It will evaluate Condition B first and if Condition B is false, it will not evaluate Condition A ?
thanks
Are you saying:PowerLanguage is smart enough and won't evaluate the second condition if the first condition is false. But you should keep in mind that in TS EasyLanguage such conditional expressions are evaluated not from left to right as in many other languages including PowerLanguage but from right to left.
TS Easylanguage evaluate from right to left whilst
MC Powerlanguage evaluate from left to right ?
Re: Evaluation of easylanguage expressions
For those who may be interested 16 years later; I have just made the test : it's no longer the case, both languages evaluate from left to right (and both short-circuit)...