Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How can i use AND or OR in IF condition?  (Read 2402 times)

0 Members and 1 Guest are viewing this topic.

prasanna

  • Guest
How can i use AND or OR in IF condition?
« on: June 11, 2008, 12:34:22 AM »
hi ...

I tried Giving two conditions which are connected by OR operation in IF condition .It didnt allow me to give

or
|
||

what way i should give.,.??

to opearte like           if ((a==b) or (c==d)

advance thanks
prasanna

Dias de verano

  • Guest
Re: How can i use AND or OR in IF condition?
« Reply #1 on: June 11, 2008, 02:51:21 AM »
You have to kludge it

Code: [Select]
If "%a%"=="%b%" goto label1
If "%c%"=="%d%" goto label1
goto label2

:label1
REM you arrive here if (a==b or c==d) is TRUE

REM code
REM code
REM code

goto next

:label2
REM you arrive here if (a==b or c==d) is FALSE

REM code
REM code
REM code

:next