1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.or. .and.

Discussion in 'T&T - Scripting' started by Roedy, Apr 1, 2012.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    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?
     
  2. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
  3. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    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.
     

Share This Page