Autor Beitrag
malibu85
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Di 18.12.07 11:46 
hallo kann mir jemand einen Tip geben wie man einen Betrag der einzulesen ist (z.B real) prüfen könnte ob dieser Betrag vom Datentyp her verträglich mit einem anderen Datentyp (z.B ineger) ist? Hab mir folgende if-anweisung vorgestellt:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if (Eingabebetrag=Integer) then
 begin
   Edit1.text:=intToStr(Eingabebetrag);
 end;




doch leider ist das ungültig. Bekomme die Fehlermeldung [Pascal Fehler] Unit1.pas(62): E2029 '(' erwartet, aber ')' gefunden
Man könnte die Abfrage ja aich mit dem Vergleichsoperator " in " stellen aber auch das geht nicht.
LG Malibu85
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: Di 18.12.07 11:52 
Das hatten wir die Woche schonmal. Schau mal hier. :D

_________________
We are, we were and will not be.