Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How .AND. and .OR. are evaluated?

Jun
98
0
I have a short question.

How logical operators are evaluated? Does evaluation stops when the result is known (like && in C)? Or whole expression is evaluated?
From left to right?

(it could be checked with two user defined functions, but unfortunately now I have no access to full TCC)

best regards.
 
@AnrDaemon - thanks

----------
@rconn: Hmm. I'm not asking for artificial intelligence

Code:
Set fName=C:\xyz
If "%@Left[2,%fName]" == "D:" .AND. exist %fName BlahBlah

can be written as
Code:
Set fName=C:\xyz
If "%@Left[2,%fName]" == "D:" If exist %fName BlahBlah

In the second case filesystem will not be checked.
 
Back
Top