?
Solved

Very Easy : I just can't think!

Posted on 1998-03-23
1
Medium Priority
?
142 Views
Last Modified: 2010-04-06
Hi,
   I'm sure this is dead simple, but I can't work it out at the moment. All I want to do is change the value of Edit1.Text into an integer. Do you use casting? Or is there an easier way of taking numbers from the user?
Cheers, Nik
0
Comment
Question by:NikWhit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
BoRiS earned 40 total points
ID: 1360734
if you are wanting to convert a string as text (e.g. BoRiS) to integer then use

var
  BorryString: string;
  BorryNum: Integer;
begin
  BorryString := Bor.Text; {Edit1}
  BorryNum := StrToIntDef(BorryString, 500);
  Bor2.Text {Edit2}:= IntToStr(BorryNum);
end;

check out StrToIntDef procedure.... (help file)

if it's a number in a string field to Integer then use the StrToInt or IntToStr procedures

Later

BoRiS
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question