Autor Beitrag
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Di 01.10.02 16:06 
Hi

Gibt es eine Funktion die überprüft ob ein String in einen Integer umgewandelt werden kann?
Wenn nicht kann wer ein bsp. oder eine funktion schreiben?

cu

Onz
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 01.10.02 16:15 
Hi!

Die Funktion VAL sollte Dir in der Variable Code diese Information liefern. Sonst kannst Du auch eine selbstgeschriebene Funktion verwenden, die einfach mit try-except und StrToInt arbeitet.

MfG,
Peter

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Moritz M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Di 01.10.02 16:23 
Hi

Das mit try... hab ich schon versucht. Da sagt er aber auch nach try dass blablabla kein gültiger Integerwert ist

cu

onz
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 01.10.02 16:29 
Starte die Exe mal außerhalb von Delphi.
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Di 01.10.02 17:06 
Oder schalte bei den Debugger Optionen das Anhalten bei Sprach-Exceptions vorübergehend aus.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
Moritz M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mi 02.10.02 13:27 
Thanks @all