.or. .and.

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I am getting a message about a file not existing in the following

if "%runwith" == "jet" .and. (not exist replacemindprod.exe .or. %@FILEAGE[replacemindprod.exe] LT %@FILEAGE[replacemindprod.jar] ) call ant jet

Do .and. and .or. evaluate both sides even if the left side determines the result?
 
May 31, 2008
376
2
#3
There's a fairly recent thread about short-circuit evaluation, if that's what you're after. One succinct way to break down a series of .and.s is by nesting successive IFs. IF c1 .and. c2 .and. c3 becomes IF c1 IF c2 IF c3, all on one line.