Ver Mensaje Individual
  #1  
Antiguo 22-07-2004
Anotherlife Anotherlife is offline
Registrado
 
Registrado: jul 2004
Posts: 1
Reputación: 0
Anotherlife Va por buen camino
Multiplicacion por un flotante

Hola soy nuevo en esto de la programacion en Delphi y haber si me pueden ayudar. Quiero hacer un programa donde incluye una multiplicacion de un dato de un campo Edit, por un flotante, Asi lo tengo pero no funciona:

Edit1.Text:=floattostr(strtofloat(Edit1.Text)*0.3);
Edit2.Text:=floattostr(strtofloat(Edit2.Text)*0.3);
Edit3.Text:=floattostr(strtofloat(Edit3.Text)*0.4);
Edit4.Text:=floattostr(strtofloat(Edit1.Text)+strtofloat(Edit2.Text)+strtofloat(Edit3.Text));

Ya intente poniendo comillas simples y parentesis en el 0.3

Un ejemplo de lo que quiero es:

Edit4 := (60*0.3)+(60*0.3)+(80*.04) con el resultado tambien en flotante (ejem: 6.80)
Responder Con Cita