Autor Beitrag
Franky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Windows 98; xphomeedition
Delphi 2007 RAD Studio
BeitragVerfasst: Sa 15.05.04 15:08 
...Wert zugewiesen werden."

Hi, ich programmier eigentlich nich in Delphi (find Pure Basic besser; Geschmackssache), muss es aber halt für die Schule, darum hab ich mal ne Frage

Was is hier Falsch?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.decbuttonClick(Sender: TObject);
var wert:real;
begin
   wert:=strtofloat(Eingeb.text);
   Dec(wert);
   erg.caption:=floattostr(wert);
end;


Ich krieg oben genannte Fehlermeldung bei Dec(wert);

Moderiert von user profile iconPeter Lustig (16:12, 15.05.2004): Code- durch Delphi-Tags ersetzt

_________________
Hier könnte ihre Werbung stehen
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Sa 15.05.04 15:10 
Dec gibts nur für Integer. Für Fließkommazahlen musst du das normale x := x - 1 nutzen
Franky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Windows 98; xphomeedition
Delphi 2007 RAD Studio
BeitragVerfasst: Sa 15.05.04 15:14 
Ok, danke, hatte es auch mit Round() versucht, lief aber nich, naja, vielleicht hatte ich auch was falsch gemacht.... :roll:

_________________
Hier könnte ihre Werbung stehen