Home > lang > or 
 en fr de es it nl pl pt pt_BR mk sq ca cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
OR
Result = Expression OR Expression

Computes the logical or of two boolean expressions, or the numerical or of two integer numbers.

The logical OR operator takes two boolean expressions and returns a true or false value. The result returned by this operator is shown in the following table:

A B A OR B
FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE TRUE

The numerical OR operator takes two integer values and returns an integer value. Each corresponding bit of the specified values are combined according to the following table:

A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

Example

PRINT TRUE OR FALSE

True

PRINT FALSE OR FALSE

False

PRINT 7, Bin(7, 16)
PRINT 11, Bin(11, 16)
PRINT 7 OR 11, Bin(7 OR 11, 16)

7       0000000000000111
11      0000000000001011
15      0000000000001111

See also

Logical Operators