help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'math' (#rtl)

ceil

Return the lowest integer number greater than or equal to argument

Declaration

Source position: math.pp line 320

function ceil(

  x: float

):Integer;

Description

Ceil returns the lowest integer number greater than or equal to x. The absolute value of x should be less than maxint.

Errors

If the asolute value of x is larger than maxint, an overflow error will occur.

See also

floor

  

Return the largest integer smaller than or equal to argument

Example

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505