If statement that has two expressions with an OR operand

Raz A.
Haifa,

Apr 16, 2019
82 Posts

0  |  0  

Re: If statement that has two expressions with an OR operand

I am using ateasy 7 142g
In the following code:

If(expression1 OR expression2)
       Print("blabla")
Endif

If expression1 is TRUE, why does ateasy also evaluates expression2 ?

Solution Available
DrATEasy (Ron Y.)
Mission Viejo, CA

Apr 17, 2019
358 Posts

1  |  0  

Re: If statement that has two expressions with an OR operand

You need to check the check box in the Project Misc Properties page: Optimize Short Circuit Boolean Expressions

That will cause ATEasy not to evaluate expression2   if expression1 is True.

Raz A.
Haifa,

Apr 18, 2019
82 Posts

0  |  0  

Re: If statement that has two expressions with an OR operand

Ok thanks.

Can i ask what is the motivation of performing such a flag?
Or an example where a programmer wants that flag unchecked?

DrATEasy (Ron Y.)
Mission Viejo, CA

Apr 18, 2019
358 Posts

0  |  0  

Re: If statement that has two expressions with an OR operand

For backward compatibility.



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]