Or operator (LotusScript® Language)

Performs a logical disjunction on two expressions.

Syntax

expr1 Or expr2

Elements

expr1, expr2

Any expressions. Their values must lie within the range for Long values.

Usage

In using the Or operation, both expressions must be FALSE for the result to be FALSE.

expr1

expr2

Result

TRUE

TRUE

TRUE

TRUE

FALSE

TRUE

FALSE

TRUE

TRUE

FALSE

FALSE

FALSE

TRUE

NULL

TRUE

NULL

TRUE

TRUE

FALSE

NULL

NULL

NULL

FALSE

NULL

NULL

NULL

NULL

In addition to performing a logical disjunction, the Or operator compares identically positioned bits in two numeric expressions (known as a bit-wise comparison) and sets the corresponding bit in the result according to the following table.

Bit n in expr1

Bit n in expr2

Bit n in result

1

1

1

1

0

1

0

1

1

0

0

0

Example

' Boolean usage
Dim johnIsHere As Boolean, jimIsHere As Boolean
Dim oneOrMoreIsHere As Boolean
johnIsHere = TRUE
jimIsHere = FALSE
oneOrMoreIsHere = johnIsHere Or jimIsHere
Print oneOrMoreIsHere                ' Prints True

' Bit-wise usage
Dim x As Integer, y As Integer
x% = &b11110000
y% = &b11001100
Print Bin$(x% Or y%)                  ' Prints 11111100