next up previous contents index
Next: Freemem Up: Functions and Procedures Previous: Flush

Frac

   

Declaration:

Function Frac (X : real) : Real;

Description:

Frac returns the non-integer part of X.

Errors:

None.

See also:

Round, Int

Example
Program Example27;

{ Program to demonstrate the Frac function. }

Var R : Real;

begin
  Writeln (Frac (123.456):0:3);  { Prints  O.456 }
  Writeln (Frac (-123.456):0:3); { Prints -O.456 }
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998