VB icon

Addition of Two Numbers in Delphi

Email
Submitted on: 8/31/2016 1:26:40 AM
By: Jake R. Pomperada  
Level: Beginner
User Rating: Unrated
Compatibility: Delphi 7, Delphi 6, Delphi 5, Delphi 4
Views: 2147
author picture
 
     This will be my first time to successfully understand and run a Delphi program that I wrote before I have some difficulty in understanding this programming language that is super set of Pascal programming language. It is very easy to write a code in Delphi once you have a good understanding of its environment, tools and of course the Pascal programming language. In this sample program will ask the user to give two numbers and then our program will compute the sum of the two numbers given by the user. I have a great time learning Delphi it is very similar to Visual Basic the only difference is that it uses Pascal as its primarily programming language. Easy to learn and very fast to run the program. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.

 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
!**************************************
! Name: Addition of Two Numbers in Delphi
! Description:This will be my first time to successfully understand and run a Delphi program that I wrote before I have some difficulty in understanding this programming language that is super set of Pascal programming language. It is very easy to write a code in Delphi once you have a good understanding of its environment, tools and of course the Pascal programming language.
In this sample program will ask the user to give two numbers and then our program will compute the sum of the two numbers given by the user. I have a great time learning Delphi it is very similar to Visual Basic the only difference is that it uses Pascal as its primarily programming language. Easy to learn and very fast to run the program.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
 
My mobile number here in the Philippines is 09173084360.
 
! By: Jake R. Pomperada
!**************************************

unit add;
interface
uses
 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 StdCtrls;
type
 TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit2: TEdit;
Label4: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Label5: TLabel;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
 private
{ Private declarations }
 public
{ Public declarations }
 end;
var
 Form1: TForm1;
implementation
{$R *.DFM}
Var a,b : integer;
procedure TForm1.Button1Click(Sender: TObject);
begin
a:= strtoint(edit1.text);
b:= strtoint(edit2.text);
edit3.text := inttostr(a+b);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.text := '';
edit2.text := '';
edit3.text := '';
edit1.setfocus;
end;
end.


Other 22 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.