?
Solved

Integer type question

Posted on 2005-05-06
6
Medium Priority
?
173 Views
Last Modified: 2010-04-06
hi, I got an error message saying 8231231233234211 is not a valid integer value.
I could not use int64 also getting the same message.
what type should i use for such numbers containing 16 digits?
thanks
0
Comment
Question by:oalawna
  • 3
  • 2
6 Comments
 
LVL 11

Assisted Solution

by:pcsentinel
pcsentinel earned 400 total points
ID: 13945368
Integer      –2147483648..2147483647      signed 32-bit

but an int64 can go up to 9223372036854775807

this code works for me

var
      l64: Int64;
begin
  l64:=Int64(8231231233234211);
  label1.caption:=IntToStr(l64);
end;

how are yuo trying to assign the number to an int64


regards
0
 

Author Comment

by:oalawna
ID: 13945559
thanks
it is like

function GetTheInt64Result:int64
begin

Result:= strtoint('8231231233234211');

end;
0
 

Author Comment

by:oalawna
ID: 13945572
it is actually a EConvertError message.
0
Technology Partners: 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!

 
LVL 10

Accepted Solution

by:
_Katka_ earned 1600 total points
ID: 13945660
Hi, try to use:

function GetTheInt64Result:Int64;
begin
  Result:=SysUtils.StrToInt64('8231231233234211');
end;

instead..regards,
Kate
0
 

Author Comment

by:oalawna
ID: 13945711
thank you both
0
 
LVL 10

Expert Comment

by:_Katka_
ID: 13945717
You're welcome :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Loops Section Overview
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

864 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