ceiling()

Synopsis

Returns the smallest integer not less than n. If n is an integral-valued Number , returns that Integer . If n has a fractional component, returns the next-larger Integer . This applies even when n is negative.

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

Syntax

ceiling ( n as Number ) As Integer 
Argument Type Description
n Number The input number .

Example 1

Intent >ceiling(5.1) 
--> 6 

Example 2

Intent >ceiling(-5.1) 
--> -5 
The result is the next higher integer value, even if input is negative.

Example 3

Intent >ceiling(5) 
--> 5