You are here: Function Reference > Alphabetical Listing > I > INT

INT

Use this function to return the integer portion of a number.

Syntax

INT (Number)

Parameter

Description

Number

Enter a valid numeric data type. The default is the integer value of the current field

The system returns the integer value of a number.

The decimal portion of the number is truncated. The number is not rounded up or down. The sign of the number is not changed.

Example

Here are some examples:

Function

Result

Explanation

INT(-101.99)

-101

Defaults to the current field.

$TEMP = 99.99

 

#RESULT = INT($TEMP)

99

After executing these statements, $TEMP will be 99.99 and #RESULT will be 99, without a decimal.

#RESULT =

INT(10/4)

2

The parameter value will equate to 2.5 The INT function will truncate this result to 2. The function does not round.

See also