procedure TForm1.W3Button22Click(Sender: TObject);
var vr : float;
begin
WriteLn('Round(12.75) = '+IntToStr(Round(12.75)));
WriteLn('Trunc(12.75) = '+IntToStr(Trunc(12.75)));
WriteLn(' Int(12.75) = '+FloatToStr(Int(12.75)));
WriteLn(' Frac(12.75) = '+FloatToStr(Frac(12.75)));
vr := 12.85;
WriteLn(' Fraction(12.85) = '+FloatToStr(vr.Fraction()));
WriteLn(' Floor(12.75) = '+FloatToStr(Floor(12.75)));
WriteLn(' Ceiling(12.85) = '+FloatToStr(vr.Ceiling()));
WriteLn(' Round(12.75) = '+FloatToStr(Round(12.75)));
WriteLn(' Truncate(12.85) = '+FloatToStr(vr.Truncate()));
end;
|