The Or operator

 

If (condition) Or (condition) then

statement

statement

statement

End if

 

For example

 

If decSales > 300000 Or intYearsEmployed > 4 then

     decCommission = decSales * .03

Else

     decCommission = decSales * .02

End If

 

q  When using the logical operator Or only one of the conditions stated must be true for the condition to be true.

 

 

Another Venn Diagram

 

Sales > $300.000 Or Years employed > 4

OR - Any one of the conditions are present (more than one conditions may be present).

 

 

Truth Table for Disjunctions 

1st Condition

2nd Condition

Statement

A

B

A or B

true

true

true

true

false

true

false

true

true

false

false

false

 

 

 

 

 

 

 

Another example

 

If decSales > 300000 _

Or intYearsEmployed > 4 _

Or blnManagement then

     decCommission = decSales * .03

Else

     decCommission = decSales * .02

End If

 

Years employed > 4

Or Sales > $300.000

Or is Management

 

Truth Table for Disjunctions

1st Condition

2nd Condition

3rd Condition

Statement

 

A

B

C

A or B or C

 

true

true

true

true

 

true

true

false

true

 

true

false

true

true

 

true

false

false

true

 

false

true

true

true

 

false

false

true

true

 

false

true

false

true

 

False

False

false

false