How to show floats only 2 number after point in delphi? -


this question has answer here:

in delphi programming want show 13.45 instead of 13.45876 ,would please me? mean want manage show way of float value. best regards.

there numerous options including:

to illustrate:

{$apptype console}  uses   sysutils;  const   d: double = 13.45876;  begin   writeln(formatfloat('0.00', d));   writeln(floattostrf(d, fffixed, 16, 2));   writeln(format('%.2f', [d])); end. 

output

 13.46 13.46 13.46 

Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

php - Redirect and hide target URL -