Returns the integer portion of a specified number.

Syntax

INT(<expN>)

<expN>

A number whose integer value you want to determine and return.

Description

Use INT( ) to remove the decimal digits of a number and retain only the integer portion, the whole number.

If you pass a number with decimal places to a function, command, or method that uses an integer as an argument, such as SET EPOCH, dBASE Plus automatically truncates that number, in which case you don't need to use INT( ).

The following table compares INT( ), FLOOR( ), CEILING( ), and ROUND( ). (In these examples, the value of the second ROUND( ) argument is 0.)

<expN>

INT( )

FLOOR( )

CEILING( )

ROUND( )

2.56

2

2

3

3

–2.56

–2

–3

–2

–3

2.45

2

2

3

2

–2.45

–2

–3

–2

–2