Knowledge Walls
John Peter
Pune, Maharashtra, India
OR Operator in Logical Operators of MS-DOS Commands
3804 Views
Hints 
OR operator Return true when atleast one of the condition is true.

Logic:
Condition 1 Condition 2 Result
true true true
false true true
true false true
false false false

Example
@echo off

SET age=22

IF %age%==18 goto :a10
IF %age%==24 goto :a10
GOTO :a11

:a10
ECHO "Age is suitable!"
GOTO :a12

:a11
ECHO "Age is not suitable"

:a12
SET /p exit=Press enter to exit
Output 
Previous Topics
Previous lessons of current book.
Logical Operators of MS-DOS Commands
Relational Operators of MS-DOS Commands
Relational Operators of MS-DOS Commands
Relational Operators of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Logical Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Relational Operators of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details