DADiSP Worksheet Functions > Function Categories > Binary Series > OR

 

OR

Purpose:

Performs a logical OR of two expressions.

Syntax:

OR(val1, val2)

val1

-

A scalar, series, or table.

val2

-

A scalar, series, or table.

Returns:

A scalar, series, or table.

Example:

or(W1, W2)

 

returns a series or table with zeros at points where both W1 and W2 contain a zero, and ones where either W1 and W2 have nonzero values.

Example:

or({0, 2, 5, 1}, 0)

 

returns a series {0, 1, 1, 1}

Remarks:

OR can also be performed using the infix operator ||. The function or(W1, W2) is identical to the expression W1 || W2.

 

See |+ to perform a bitwise OR operation.

See Also:

< <= > >= == != (Conditional Operators)

&& || ! AND OR NOT XOR (Logical Operators)

>> << & ~ |+ |^ (Bit Operators)

AND

FLIPFLOP

NOT

XOR