xHarbour Reference Documentation > Function Reference |
Rounds a decimal number to the next higher integer.
Ceiling( <nValue> ) --> nInteger
The return value is the next higher integer value of <nValue>. If <nValue> is an integer already, it is returned unchanged.
See also: | Floor(), Round() |
Category: | CT:Math , Mathematical functions |
Source: | ct\ctmath2.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows results of function Ceiling(). PROCEDURE Main ? Ceiling( -2.0 ) // result: -2 ? Ceiling( -2.00001 ) // result: -2 ? Ceiling( 2.0 ) // result: 2 ? Ceiling( 2.00001 ) // result: 3 RETURN
http://www.xHarbour.com