Ver Mensaje Individual
  #2  
Antiguo 05-12-2005
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
Prueba así:

Código Delphi [-]
  procedure TForm1.Button1Click(Sender: TObject);
  var
  a  : Currency;
  a1 : Currency;
  tot: Currency;
  begin
  a  := strtoint(edit1.Text);  //precio compra
  a1 := strtoint(maskedit1.Text); //valor del cliente
  tot:= (a * a1);
  maskedit1.Text := FormatFloat(',0.00',tot);
  end;

Además deberías utilizar Try...Except para cubrirte de valores incorrectos.

Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita