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

frac

Return fractional part of floating point value.

Declaration

Source position: mathh.inc line 99

function frac(

  d: ValReal

):ValReal;

Description

Frac returns the non-integer part of X.

Errors

None.

See also

Round

  

Round floating point value to nearest integer number.

Int

  

Calculate integer part of floating point value.

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.

Documentation generated on: Nov 16 2015