round()

Synopsis

Returns the integer nearest to the given number, n. If the given number is equidistant between two integers (ends in ".5") the function rounds towards the nearest even integer.

You can also use the floor() or ceiling() functions to convert a number into an Integer.

Syntax

round ( n As Number ) As Integer 
Argument Type Description
n number The number to round.

Example 1

Intent >round(0.7) 
--> 1 

Example 2

Rounding to nearest even integer
Intent >round(-1.5) 
--> -2 
Because -1.5 was exactly between -1 and -2, the function rounded to the nearest even integer, -2.