Autor Beitrag
ute.h_80
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

Win XP
D5 Enterprise
BeitragVerfasst: Do 20.11.03 12:54 
Wer kann mir helfen! :(

Ich brauch große Integerwerte(Int64) und bei der Funktion HIGH zeigt er nen Wertebereich von 9,2E18 bis -9,2E18 an aber wenn ich Werte über 2147483647 eingebe kommt diese dumme Delphifenster: "Kein gültiger Integerwert."

Wie kann ich das umgehen und den wirklichen Int64 Wertebereich nutzen :?:

Gruß Ute
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 13:02 
Hallo,

wie gibst du die werte denn ein?

Verwendestd du da eine Komponente, wie z.B. Spin Edit?
Oder wandelst du mit funktionen wie StrToInt um?

Bei beiden Varianten kann ich mir (ohne es geprüft zu haben) vorstrellen das die beteiligten Werkzeuge (das Spin Edit oder auch StrToInt) nur mit 32 Bitigen Integer Werten arbeiten.

Du müsstest sie also vermeiden.

Gruß
Klabautermann
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 20.11.03 13:09 
Von StrToInt gibt es aber IMHO eine überladene Version für Int64...!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 13:18 
Hallo,

habe gerade mal in die Hilfe geguckt.

Es gibt keine überladene Funktion von StrToInt, aber es gibt die Funktion StrToInt64.

Gruß
Klabautermann
ute.h_80 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

Win XP
D5 Enterprise
BeitragVerfasst: Do 20.11.03 13:23 
Hab die Zahlen über nen Edit Feld eingeben.

Aber dies StrtoInt64 hab ich ausprobiert, geht immmer noch net. :cry:

Gruß Ute
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 13:27 
Hallo,

kannst du dann mal die Stelle des Quelltextes posten, an welcher der Fehler auftritt?
Und die genaue Fehlermeldung wenn sie sich geändert hat.

Gruß
Klabautermann
ute.h_80 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

Win XP
D5 Enterprise
BeitragVerfasst: Do 20.11.03 13:44 
Also der Quelltextausschnitt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
IF Strtoint(EUKLID_ZAHL1.Text) > Strtoint(EUKLID_ZAHL2.Text) THEN
        BEGIN
             m := Strtoint64(EUKLID_ZAHL1.Text);
             n := Strtoint64(EUKLID_ZAHL2.Text);
        END
     ELSE
        BEGIN
             m := Strtoint64(EUKLID_ZAHL2.Text);
             n := Strtoint64(EUKLID_ZAHL1.Text);
        END;

     erg := m mod n;


Und bei der Fehlermeldung hat sich nichts geändert! Immernoch die selbe..." xxx, ist kein gültiger Integerwert"
[/delphi]
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 13:51 
Hallo,

da hast du etwas übersehen:
ausblenden Delphi-Quelltext
1:
IF Strtoint(EUKLID_ZAHL1.Text) > Strtoint(EUKLID_ZAHL2.Text) THEN					

auch hier muss es heißen:
ausblenden Delphi-Quelltext
1:
IF Strtoint64(EUKLID_ZAHL1.Text) > Strtoint64(EUKLID_ZAHL2.Text) THEN					


Gruß
Klabautermann
ute.h_80 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

Win XP
D5 Enterprise
BeitragVerfasst: Do 20.11.03 13:56 
Danke, manchmal seh ich echt den Wald vor Bäumen nicht. Sorry :roll:
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 20.11.03 15:10 
Hi,
ute.h_80 hat folgendes geschrieben:
manchmal seh ich echt den Wald vor Bäumen nicht. Sorry :roll:

das geht doch jeden so. Deshalb fragte ich ja nach dem Quelltext ;).

Gruß
Klabautermann