BIT_OR macro
The BIT_OR
macro
is available in Unica Campaign and Unica Interact.
Syntax
data1 BIT_OR data2 data1 OR
data2 data1 | data2
Parameters
data1
The
non-negative integers to bitwise OR with the values in data2
.
This can be a constant value, a column, a cell range, or an expression
evaluating to any of the above. For the format definition of data
,
see the "Macro Function Parameters" section in the chapter
in this guide for your product.
data2
The
non-negative integer(s) to bitwise OR with the values in data1
.
This can be a constant value, a column, a cell range, or an expression
evaluating to any of the above. The number of columns in data2
must
equal the number of columns in data1
, unless data2
is
a constant. For the format definition of data
, see
the "Macro Function Parameters" section in the chapter in
this guide for your product.
Description
BIT_OR
performs
a bitwise OR between the two specified data ranges. It returns a new
column for each input column, each containing the corresponding column
in data1
bitwise OR-ed to the corresponding column
of data2
(that is, the first column of data1
is
bitwise OR-ed to the first column of data
, the second
column with the second column, and so on).
If data2
is
a constant, each value in data1
is bitwise OR-ed
by that value. If data2
contains one or more columns,
the calculations are performed on a row-by-row basis between one column
from data2
and one column from data2
.
The first row of data1
is bitwise OR-ed to the first
row value of data2
, the second row with the second
row, and so on. This row-by-row calculation produces a result for
each row up to the last value of the shortest column.
BIT_OR
operator can be abbreviated
with a vertical bar (|
). Use the vertical bar to
separate the two columns (for example, to specify BIT_OR(V1,
3)
, you can simply type V1|3
. You also can
use OR
.Examples
TEMP = 3 BIT_OR 7 or TEMP = 3 OR
7 or TEMP = 3 | 7 Creates a new column
named |
TEMP = V1 | 8 Creates a new column named |
TEMP = V1 | V1 Creates a new column named |
TEMP = V1 | V2 Creates a new column named |
TEMP = V1:V3 | V4:V6 Creates three new columns
named |
TEMP = V1[10:20] | V2 or TEMP = V1[10:20]
| V2[1:11] Creates a new column named |
Related Functions
Function | Description |
---|---|
BIT_AND |
Computes the bitwise AND between two specified data ranges |
BIT_NOT |
Computes the bitwise NOT of the contents of the specified data range |
BIT_XOR or XOR |
Computes the bitwise XOR between two specified data ranges |