Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Numbers ..Newbie

Status
Not open for further replies.

xxman

Technical User
Jun 1, 2004
80
US
Hi
I searched the web for an example of adding two decimal
numbers together. No Luck. Could someone provide an example
edit1 + edit2 = result edit3
Thank You
 
edit1 is not a decimal number, it's a string (actually it is edit1.caption)

so

Edit3.caption := IntToStr(StrToInt(Edit1.caption) + StrToInt(Edit2.Caption));

will do the job

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
it's the .Text property

a TEdit doesn't have .Caption property

Leslie
 
oops, my bad.

thanks for correcting me Leslie.

[thumbsup]

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
no problem....it's still pretty early! I had to check the help just to make sure....I thought, is it caption?

Happy Friday!

Les
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top