Re: I try to make... (new user on Delphi)


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by stijn on September 19, 2002 at 23:14:57:

In Reply to: I try to make... (new user on Delphi) posted by Stijn on September 19, 2002 at 22:57:23:

: Hello,
: I try to make a small calculator.
: Their are three editboxes, two editboxes where you put in a number and then you click a button, which makes a caculation edit1+edit2=edit3 and the awnser, edit3, shows up in the third editbox.
: The lay out isn't a problem. My problem is the use of the StrToInt and the reverse fuction.
: I would appresciate if somebody could do a little code example for me.

---------------
I manged to come so far, but i only can't make the anwser to come in the edit3box.

procedure TForm1.Button1Click(Sender: TObject);
var
  getal1: Integer;
  getal2: Integer;
begin
  getal1 := StrToInt(Edit1.Text);
  getal2 := StrToInt(Edit2.Text);
  ShowMessage(IntToStr(getal1 + getal2));
end;
 

Related Articles and Replies:


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]