CEILING( ) Function

Returns the next highest integer that is greater than or equal to the specified numeric expression.

CEILING(nExpression)

Parameters

  • nExpression
    Specifies the number whose next highest integer CEILING( ) returns.

Return Value

Numeric

Remarks

CEILING rounds a number with a fractional portion to the next highest integer.

Example

STORE 10.1 TO num1
STORE -10.9 TO num2
? CEILING(num1)  && Displays 11
? CEILING(num2)  && Displays -10
? CEILING(10.0)  && Displays 10
? CEILING(-10.0) && Displays -10

See Also

Reference

FLOOR( ) Function
ROUND( ) Function
Integer Field Type

Concepts

Creating Numeric Expressions

Other Resources

Functions
Language Reference (Visual FoxPro)