Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   convertir string a double!! (https://www.clubdelphi.com/foros/showthread.php?t=73917)

negrokau 24-05-2011 17:36:20

convertir string a double!!
 
como puedo convertir un string a un double... gracias...

DarkMan 24-05-2011 17:53:11

¡Hombre, con lo fácil que es, no tardarán en darte una respuesta!

Casimiro Notevi 24-05-2011 18:18:37

Algo así como StrTo... ;)

http://www.delphibasics.co.uk/ByLetter.asp?Letter=S

negrokau 24-05-2011 18:19:08

tu lo sabes?

oscarac 24-05-2011 18:49:07

Se me adelantaron


Código Delphi [-]
 
var
  stringValue : string;
  floatValue  : Extended;

begin
  // Set up the source string containing a number representation
  stringValue := '123.456E+002';

  // Convert it to a floating point number
  floatValue  := StrToFloat(stringValue);

  // And display the value
  ShowMessage(stringValue+' = '+FloatToStr(floatValue));
end;

Neftali [Germán.Estévez] 25-05-2011 10:07:31

Bug en Delphi!!
 
Están:

StrToDate
StrToInt
StrToCurr
StrToTime
StrToFloat
StrToInt64
StrToWord
...


¡¡¡Y no está StrToDouble!!! :eek::eek::eek::eek::eek:

Casimiro Notevi 25-05-2011 11:44:35

Cita:

Empezado por Neftali (Mensaje 401263)
¡¡¡Y no está StrToDouble!!!

Nunca me ha dado por seguir el código, pero supongo que StrToFloat cumple ese cometido.


La franja horaria es GMT +2. Ahora son las 22:21:53.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi