Autor Beitrag
Philipp_Reitter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 430



BeitragVerfasst: Di 28.03.06 14:32 
hi

ich schreibe gerade ein verschlüsselungsprogramm aber delphi sagt mir immer das meine zahlen zu lange sin ... (glaube ich halz)

'1894523489187423784563185415745624189564156746' ist mein gültiger Integerwert


kein wunder die sind über 1 tausendstellig...(manchmal)
kann ich da dagengen irgendetwas machen
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Di 28.03.06 14:35 
=> Langzahlarithmetik
Philipp_Reitter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 430



BeitragVerfasst: Di 28.03.06 14:37 
das hilft mir jetzt nicht viel...
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Di 28.03.06 14:39 
Integer geht auch nur bis 217xxxxxx (genau weiß ich nich.. 9 stellen)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Philipp_Reitter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 430



BeitragVerfasst: Di 28.03.06 14:41 
und anders kann mans nicht machen???
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Di 28.03.06 14:45 
Doch, mit Langzahlarithmetik, z.B.

www.delphiforfun.org...ary/big_integers.htm
Philipp_Reitter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 430



BeitragVerfasst: Mi 29.03.06 05:35 
ok danke ich schau mal...
DerDepp
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 21



BeitragVerfasst: Mi 29.03.06 07:06 
Mach doch einfach einen String draus und lesen nur die entsprechenden Stellen in ein Integer ein - damit kannst du leicht über 9 (?) Stellen handeln.
Morgen DeDe
Philipp_Reitter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 430



BeitragVerfasst: Mi 29.03.06 14:41 
ja aber dann kann ich das nicht irgedwie rechnen lassen * / - +
Vera
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 82

WinXP Home
Delphi 2005 Personal
BeitragVerfasst: Mi 29.03.06 14:46 
user profile iconDerDepp hat folgendes geschrieben:
Mach doch einfach einen String draus und lesen nur die entsprechenden Stellen in ein Integer ein - damit kannst du leicht über 9 (?) Stellen handeln.

Weder ein String noch ein Integer ist für diese Art von Daten geeigent.
Danny87
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 688

Windows 10 Pro 64bit
Sprachen: HTML, PHP, JavaScript, Delphi || IDE: RAD Studio 10.1 Berlin Starter, WeBuilder
BeitragVerfasst: Mi 29.03.06 14:51 
ich rate einfach mal drauf los...


vllt hilft da Cardinal (ich weiss nicht wie lange die sein können)


gruss daniel
Vera
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 82

WinXP Home
Delphi 2005 Personal
BeitragVerfasst: Mi 29.03.06 14:57 
user profile iconDanny87 hat folgendes geschrieben:
ich weiss nicht wie lange die sein können

Jedenfalls nicht lang genug. :-D

Aber über die "Größe" möchte ich mich - in einem von 99% männlichen Mitgliedern besuchtem Forum - nicht streiten :mrgreen:
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Mi 29.03.06 15:18 
Lustig, Lustig :!:
Wie stehts mit Int64?
Wie groß sind die denn?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 29.03.06 15:31 
user profile iconBigboss hat folgendes geschrieben:
Wie stehts mit Int64?
Wie groß sind die denn?
Integer haben 32 Bits, Int64 haben 64. Folglich können Int64-Wert maximal doppelt so lang (in ihrer Binärdarstellung) werden wie Integer. Oder anders ausgedrückt, ca. 2^32 mal so groß.

user profile iconVera hat folgendes geschrieben:
Aber über die "Größe" möchte ich mich - in einem von 99% männlichen Mitgliedern besuchtem Forum - nicht streiten :mrgreen:
Kommt ja auch auf die Technik an. :mrgreen: Der Tipp mit der Langzahlarithmetik war ja schon ganz gut.

_________________
We are, we were and will not be.
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Mi 29.03.06 15:40 
user profile iconDerDepp hat folgendes geschrieben:
Mach doch einfach einen String draus und lesen nur die entsprechenden Stellen in ein Integer ein - damit kannst du leicht über 9 (?) Stellen handeln.
Morgen DeDe


Mein Name ist Programm :)
Pscore
Hält's aus hier
Beiträge: 14



BeitragVerfasst: Do 30.03.06 22:12 
Typ Bereich Format
Integer -2147483648..2147483647 32 Bit, mit Vorzeichen
Cardinal 0..4294967295 32 Bit, ohne Vorzeichen
Zu den fundamentalen Integer-Typen gehören Shortint, Smallint, Longint, Int64, Byte, Word und Longword.

Fundamentale Integer-Typen
Typ Bereich Format
Shortint -128..127 8 Bit, mit Vorzeichen
Smallint -32768..32767 16 Bit, mit Vorzeichen
Longint -2147483648..2147483647 32 Bit, mit Vorzeichen
Int64 -2^63..2^63-1 64 Bit, mit Vorzeichen
Byte 0..255 8 Bit, ohne Vorzeichen
Word 0..65535 16 Bit, ohne Vorzeichen
Longword 0..4294967295 32 Bit, ohne Vorzeichen

Typ Bereich Signifikante Stellen Größe in Byte
Real48 2.9 x 10^-39 .. 1.7 x 10^38 11-12 6
Single 1.5 x 10^-45 .. 3.4 x 10^38 7-8 4
Double 5.0 x 10^-324 .. 1.7 x 10^308 15-16 8
Extended 3.6 x 10^-4951 .. 1.1 x 10^4932 19-20 10
Comp -2^63+1 .. 2^63 -1 19-20 8
Currency -922337203685477.5808.. 922337203685477.5807 19-20 8

Vielleicht hilft dir das weiter ansonsten, langzahlarithmetik!
Gruß