[Overview][Constants][Types][Classes][Procedures and functions] |
Return the lowest integer number greater than or equal to argument
Source position: math.pp line 290
function ceil( |
x: float |
):Integer; |
Ceilreturns the lowest integer number greater than or equal to x. The absolute value of xshould be less than maxint.
If the asolute value of xis larger than maxint, an overflow error will occur.
|
Return the largest integer smaller than or equal to argument |
Program Example7; { Program to demonstrate the Ceil function. } Uses math; begin Writeln(Ceil(-3.7)); // should be -3 Writeln(Ceil(3.7)); // should be 4 Writeln(Ceil(-4.0)); // should be -4 end.