BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

string to int64 + compatibility Int64 with x modul y

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Thomas Willms
Guest





PostPosted: Sat Feb 04, 2006 4:35 am    Post subject: string to int64 + compatibility Int64 with x modul y Reply with quote



Hello,
could somebody tell me how to convert a string to a number with the formate
INT64 or another formate with the highest precision possible for numbers in
the range of not
less then 100000000000 I would like to have a maximum precision in all
positions
until the last number....(important)...and the highest number of positions
I give the beginning of the code below (prime test).... I encounter the
following problems:
Which formate of string? (Ansi ?); how to convert from string to Int64;
compatibility of Int64 (or others than integers) with x modul y
and with the loop -----> For y := 2 to z do
Question : What is the difference between integer and lonint if the range
of
numbers (according to my book) is the same...


Thank you very much


Function test

type Teiler=array[1..20] of Int64; <------------------------highest
integer numbers possible
number of positions possible (>> Integer )
var prime, y, z: Int64; <--------prime more than ten positions
z1 : Extended;primstring,NS1,NS2,ergebnis,ergebnis2,NX,No: Ansistring;
<------------------------highest length possible
y1,y2,d : teiler; m : extended; i,j,code : integer;
begin
primestring:=form11.edit1.text; <-------string (longest possible)
ergebnis:='';ergebnis2:=''; val(primestring,prime,code); i:=0;j:=0;
//// <------------------------highest number of integer positions possible
z:=Integer(round(sqrt(prime)));
For y:=2 to z do //<-----z et y same format might be less then prime
(squareroot)
begin
m:=prime mod y; ///<-------problème de compatibilité +
/// m must be exact to be sure that "not
zero" is recogniced
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.