Autor Beitrag
Rag3
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mo 25.04.05 23:23 
Hi,
wenn ich in meinem Programm zum Beispiel 8^10000 rechne kommt selbst bei Zahlentyp extended ein Gleitkommaüberlauf. Gibt es irgendeine Möglichkeit sowas abzufangen?

ausblenden Delphi-Quelltext
1:
result := floattostr (power (strtofloat (zahl1), strtofloat (zahl2) ) );					


hab schon gegoogelt und hier im FOrum gesucht, aber ohne Erfolg...

mfg

Rag3


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Mi 27.04.2005 um 10:50
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 26.04.05 00:10 
probiere es mal mit einem try..except statement.
vielleicht gibt es dafür auch einen compilerschalter der dir hilft
z.b. {$Q+} / {$Q-} oder {$R+} / {$R-}
siehe Delphi-Hilfe: Delphi-Direktiven

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Rag3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Di 26.04.05 00:28 
:?: :?: das sind mir bömische dörfer...

wir setzte ich denn ein "try..except statement" ein?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 26.04.05 00:44 
schon mal die taste F1 ausprobiert ?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
try
  result := floattostr (power (strtofloat (zahl1), strtofloat (zahl2) ) );
except
  result := 'Fehler';
end;

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Rag3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Di 26.04.05 13:15 
thx, das werd ich nehmen!
Rag3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Di 26.04.05 13:54 
der springt irgendwir nicht in den exception-block
es kommen nach wie vor die "Gleitkommaüberlauf" meldungen...

any ideas?

ps: hab exakt den text von dir reinkopiert, auch mehrere sachen der hilfe ausprobiert, aber ohne erfolg...
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 26.04.05 14:15 
die fehlermeldung kommt nur in der IDE, wenn du die kompilierte exe direkt ausführst, wird korrekt 'Fehler' zurückgeliefert.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Rag3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Di 26.04.05 18:18 
ok das teste ich heut abend mal...