Thomas Willms Guest
|
Posted: Sat Feb 04, 2006 4:35 am Post subject: string to int64 + compatibility Int64 with x modul y |
|
|
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 |
|