procedure TForm1.Button1Click(Sender: TObject); var Total: Real; // on s'occupe de réels begin try Total := StrToFloat(ComboBox1.Text) + StrToFloat(ComboBox2.Text); except on EConvertError do Total := 0; end; Edit3.Text := FloatToStr(Total); end; procedure TForm1.Button2Click(Sender: TObject); var Total: Integer; // on s'occupe d'entiers begin Total := StrToIntDef(ComboBox1.Text, 0) + StrToIntDef(ComboBox2.Text, 0); Edit3.Text := IntToStr(Total); end;