Ver Mensaje Individual
  #3  
Antiguo 07-10-2007
Avatar de paldave
paldave paldave is offline
Miembro
 
Registrado: ago 2007
Ubicación: Uruguay
Posts: 148
Reputación: 17
paldave Va por buen camino
Red face Más "chapuceramente"

Otra forma menos "formal" de hacerlo sería así:
Código Delphi [-]
function SetPrecision(Value:Real;Digits:Byte):Real;
var s:String;
begin
  s:='.'+StringOfChar('0',Digits);
  s:=FormatFloat(s,Value);
  Result:=StrToFloat(s);
end;
Responder Con Cita