INT macro

The INT macro is available only in Unica Campaign.

Syntax

INT(data)

Parameters

data

The numerical values to round down to an integer value. 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

INT calculates the greatest integer less than the values (also known as the floor) in the specified data range. INT returns one new column for each input column, each containing the floor of numbers in the corresponding input column.

Note: This is the same as the FLOOR macro function.

Examples

TEMP = INT(4.7)

Creates a new column named TEMP containing the value 4.

TEMP = INT(-1.5)

Creates a new column named TEMP containing the value -2.

TEMP = INT(V1)

Creates a new column named TEMP, where each value is the largest integer less than or equal to the contents of column V1.

TEMP = V1 - INT(V1)

Creates a new column named TEMP containing the decimal portion of each value in column V1.

TEMP = INT(V1:V3)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the largest integers less than or equal to the contents of column V1, the values of the VX column are the largest integers less than or equal to the contents of column V2, and the values of the VY column are the largest integers less than or equal to the contents of column V3.

TEMP = INT(V1[10:20])

Creates a new column named TEMP, where the first 11 cells contain the largest integers less than or equal to the corresponding values in rows 10-20 of column V1. The other cells in TEMP are empty.

TEMP = INT(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 largest integers less than or equal to the corresponding row values of column V1, and the values in column VX are the largest integers less than or equal to the corresponding row values of column V2.

Related functions

Function Description
ROUND Computes the rounded value of the contents of the specified data range
TRUNCATE Returns the non-fractional part of each value in the specified data range