Ver Mensaje Individual
  #1  
Antiguo 19-04-2012
5TU4RT 5TU4RT is offline
Registrado
NULL
 
Registrado: abr 2012
Posts: 8
Reputación: 0
5TU4RT Va por buen camino
Exclamation Error al convertir Edit a Integer

Buenas... Estoy aprendiendo delphi y pasa que haciendo una condicion me salta un error resaltandome el "Else" pero la verdad no se porque, espero que me puedan ayudar!!!

Cita:
procedure TForm1.Button1Click(Sender: TObject);
var
a, b, suma : integer;
begin
if Edit1.Text = '' then
ShowMessage('Digite un valor');
else
Label3.caption := ('+');
a := StrToInt(Edit1.Text);
b := StrToInt(Edit2.Text);
suma := a + b;
Edit3.Text := IntToStr(suma);
end;
Responder Con Cita