ISEVEN macro

The ISEVEN macro is available only in Unica Campaign.

Syntax

ISEVEN(data)

Parameters

data

The numerical values to test if they are even. 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.

Description

ISEVEN tests each value in the specified data set for evenness. It returns one new column for each input column, each containing a one for all even values (that is, the value modulo two is zero) or a zero for all non-even values (that is, odd values).

Note: For non-integer values, the macro function INT is applied first. For example, ISEVEN(2.5) = 1, since 2 is even.

Examples

TEMP = ISEVEN(-3)

Creates a new column named TEMP containing the value zero.

TEMP = ISEVEN(V1)

Creates a new column named TEMP, where each value is the result of testing the contents of column V1 for evenness.

TEMP = ISEVEN(V1:V3)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the results of testing the contents of column V1 for evenness, the values of the VX column are the results of testing the contents of column V2 for evenness, and the values of the VY column are the results of testing the contents of column V3 for evenness.

TEMP = ISEVEN(V1[10:20])

Creates a new column named TEMP, where the first 11 cells contain the results of testing the values in rows 10-20 of column V1 for evenness. The other cells in TEMP are empty.

TEMP = ISEVEN(V1[1:5]:V2)

Creates two new columns named TEMP and VX, each with values in rows 1-5 (the other cells are empty). The values in column TEMP are the results of testing the corresponding rows of column V1 for evenness, and the values in column VX are the results of testing the corresponding rows of column V2 for evenness.

Related functions

Function Description
ISODD Tests if input values are odd (that is, not divisible by two)