Click or drag to resize

Ceiling Function

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

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION Ceiling(
	nExpression
) AS USUAL CLIPPER
Request Example View Source

Parameters

nExpression (Optional)
Type: Usual
Specifies the number whose next highest integer Ceiling( ) returns.

Return Value

Type: Usual
Numeric
Remarks
Ceiling rounds a number with a fractional portion to the next highest integer.
Examples
X#
1STORE 10.1 TO num1
2STORE -10.9 TO num2
3? Ceiling(num1)  // Displays 11
4? Ceiling(num2)  // Displays -10
5? Ceiling(10.0)  // Displays 10
6? Ceiling(-10.0) // Displays -10
See Also