[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.282 Trunc

Synopsis

 
function Trunc (x: Real): Integer;

Description

`Trunc' converts `x' to the next integer below its argument (i.e. truncates the numbers after the point).

Conforming to

`Trunc' is defined in ISO-7185 Pascal and supported by all known Pascal variants.

Example

 
program TruncDemo;
var
  Foo: Real;
begin
  Foo := 9.876;
  WriteLn (Trunc (Foo))  { Prints 9 }
end.

See also

section 9.236 Round.



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html