LOTUSSCRIPT LANGUAGE


Imp operator
Performs a logical implication on two expressions.

Syntax

expr1 Imp expr2

Elements

expr1, expr2


Usage

The following table explains how LotusScript determines the result of the Imp operation.
expr1expr2Result
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE TRUE
FALSE FALSE TRUE
TRUENULLNULL
NULLTRUETRUE
FALSENULLTRUE
NULL FALSENULL
NULL NULL NULL
In addition to performing a logical implication, the Imp 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 expr1Bit n in expr2Bit n in result
1 1 1
1 0 0
0 1 1
0 0 1

Example

Dim youCanSee As Boolean, lightIsOn As Boolean

' You don't need the light to see.

youCanSee = TRUE

lightIsOn = FALSE

Print youCanSee Imp lightIsOn          ' Prints False

' You need the light to see.

youCanSee = FALSE

lightIsOn = FALSE

Print youCanSee Imp lightIsOn          ' Prints True

See Also