Int Function

Returns the integer portion of the passed floating-point number. The difference between Fix and Int is that if number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. See also the Round function.

Int (number)

Parameters

Number  -  (Input, expression, Required)

If a string is passed, it is first converted to numeric form. If a non-numeric value is passed, Error is returned.

Return Value

The integer portion of the specified number.

Examples

Int (1)

Returns 1

Int (4.5)

Returns 4

Int (“-4.5”)

Returns -5

Int (Null)

Returns Error

Int (Error)

Returns Error

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Functions | Abs function | Atn function | Cos function | Exp function | Fix function | Int function | Log function | Max function | Min function | Rnd function | Round function | Sgn function | Sin function | Sqr function | Tan function


© 2004-2021 looksoftware. All rights reserved.