Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






And operator

Performs a logical conjunction on two expressions. LotusScript rounds to the nearest integer before performing the And operation.

Syntax

expr1 And expr2

Elements

expr1, expr2

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

Usage

When using the And operator, any FALSE expression will cause the result to be FALSE.

expr1
expr2
Result

TRUE

TRUE

TRUE

TRUE

FALSE

FALSE

FALSE

TRUE

FALSE

FALSE

FALSE

FALSE

TRUE

NULL

NULL

NULL

TRUE

NULL

FALSE

NULL

FALSE

NULL

FALSE

FALSE

NULL

NULL

NULL

Besides combining expressions, And compares identically positioned bits in two numeric expressions (known as a bit-wise comparison) and sets the corresponding bit in the result.

Bit n in expr1
Bit n in expr2
Bit n in result

1

1

1

1

0

0

0

1

0

0

0

0

Example

' Boolean usage
Dim johnIsHere As Boolean, jimIsHere As Boolean
Dim bothAreHere As Boolean
johnIsHere = TRUE
jimIsHere = FALSE
bothAreHere = johnIsHere And jimIsHere
Print bothAreHere                 ' Prints 0 (False)

' Bit-wise usage

Dim x As Integer, y As Integer
x% = &b11110000
y% = &b11001100
Print Bin$(x% And y%) ' Prints 11000000
Related topics
Logical Operators
Overview of expressions and operators
LotusScript operators
Operator order of precedence
Table of numeric operators
Boolean Operators




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009