How .AND. and .OR. are evaluated?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
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

Set fName=C:\xyz
If "%@Left[2,%fName]" == "D:" .AND. exist %fName BlahBlah
can be written as
Set fName=C:\xyz
If "%@Left[2,%fName]" == "D:" If exist %fName BlahBlah
In the second case filesystem will not be checked.